Time of Update: 2014-11-28
旋轉的風扇(RoundDisk),旋轉風扇rounddisk:工程圖:此代碼需要加入第三方庫RoundDisk.代碼: #import "AppDelegate.h"//加入標頭檔#import "RoundDiskViewController.h"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
Time of Update: 2014-11-27
IOSTimer的例子留個備忘,iostimer例子備忘 1、建立一個定時器 ,以下是便利構造器方法,+ scheduledTimerWithTimeInterval:invocation:repeats:+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: + timerWithTimeInterval:invocation:repeats:+
Time of Update: 2014-11-27
擷取iOS應用中當前處於Activity狀態的ViewController// 擷取當前處於activity狀態的view controller- (UIViewController *)activityViewController{ UIViewController* activityViewController = nil; UIWindow *window = [[UIApplication sharedApplication] keyWindow];
Time of Update: 2014-11-28
下拉選項cell,下拉cell:工程圖:此代碼要匯入第三方庫comboBox.代碼:RootViewController.h#import <UIKit/UIKit.h>//加入標頭檔#import "ComboBoxView.h"@interface RootViewController : UIViewController{ ComboBoxView *_comboBox;}@end RootViewController.m-
Time of Update: 2014-11-27
[Xcode使用] 自訂代碼區塊引述,xcode自訂Xcode本身帶有編碼常用的代碼塊可供使用,如 例如 “if” 這個代碼塊的定義 調用方法1.可以直接拖放帶編輯區 2.使用快速鍵,鍵入 “if”,
Time of Update: 2014-11-27
ios之開發中使用頻率很高的宏定義-提高裝置螢幕適配以及開發效率// log#define APP_Log(...) NSLog(__VA_ARGS__)// assert#ifdef ENABLE_ASSERT_STOP#define APP_ASSERT_STOP {LogRed(@"APP_ASSERT_STOP"); NSAssert1(NO, @" \n\n\n===== APP Assert. =====\n%s\n\n\n",
Time of Update: 2014-11-27
ios開發——解決UICollectionView的cell間距與設定不符問題在用UICollectionView展示資料時,有時我們希望將cell的間距調成一個我們想要的值,然後查API可以看到有這麼一個屬性:- (CGFloat)minimumInteritemSpacing { return
Time of Update: 2014-11-26
KVC && KVO 初見,kvckvo#import <Foundation/Foundation.h>@interface human : NSObject@property (nonatomic,assign) NSString *name;@property (nonatomic,assign) NSInteger age;-(id)initHuman:(NSString *)Initname hisage:(NSInteger)
Time of Update: 2014-11-27
KVC樣本,fineui線上樣本KVC –key value Coding,可以讓我們通過索引值編碼的形式進行屬性值的賦值 參考蘋果官網的圖。。 1.KVC 定義一個Person類 .h檔案 1: #import <Foundation/Foundation.h> 2: 3: @interface Person : NSObject 4: { 5: NSString *name; 6: } 7: 8:
Time of Update: 2014-11-27
XMPP-IOS即時通訊開發環境搭建,xmpp-ios即時通訊一.安裝MySQLsudo vi ~/.bash_profile 接著輸入i,進入編輯模式,輸入:# mysqlalias mysql='/usr/local/mysql/bin/mysql'alias mysqladmin='/usr/local/mysql/bin/mysqladmin'# lsalias ls='ls -G' 按ESC鍵退出編輯模式,輸入:
Time of Update: 2014-11-27
iOS判斷是否是表情和郵箱格式的判斷1.該方法是從論壇上看到的,,自己用啦下 感覺挺好用,在這裡做個備忘吧 !!!!!2.應用環境,使用者輸入暱稱的時候,不可以輸入 表情- (BOOL)stringContainsEmoji:(NSString *)string { __blockBOOL returnValue =NO; [string enumerateSubstringsInRange:NSMakeRange(0,
Time of Update: 2014-11-26
xcode archive後提示找不到icon,xcodeiconarchive後發現包裡面的有些icon尾碼從png改成tiff了,所以就提示找不到icon.以下是解決辦法: You need to open the project that generates the external resources bundle, select the target, go to Build Settings and then the Deployment sub-heading,
Time of Update: 2014-11-27
IOS閉包循環參考(Swift) 一、何時回形成閉包循環參考?當閉包捕獲自身引用,並且同時銷毀的時候,就會導致循環參考。不熟悉閉包的同學參見這篇文章Swift入門教程系列6-閉包例如:這裡聲明description為一個閉包,這個閉包為lazy變數(lazy 變數只有在需要的時候才會被初始化),這個閉包的功能就是調用類的執行個體函數class CSDN{var name:String?lazy var description:()->() =
Time of Update: 2014-11-26
[ios]ipad下的splitViewController
Time of Update: 2014-11-27
QuizChartViewDemo,piechartview:工程圖:需要匯入的檔案:QuizChartView.h,QuizChartView.m.代碼:RootViewController.h #import <UIKit/UIKit.h>@class QuizChartView;@interface RootViewController : UIViewController{ QuizChartView
Time of Update: 2014-11-25
[iOS基礎控制項,ios基礎控制項A.使用字典載入資料的缺點 1.使用者自行指定key,容易出錯 2.存入、取出都需要key,容易混亂 B.模型 (MVC中的model) 1.字典與模型對比: (1)字典:儲存資料,通過字串類型的key取值(容易寫錯,寫錯了key編譯器不會報錯) (2)模型:儲存資料,自訂屬性儲存資料,其實就類似JavaBean,本質是資料封裝 2.實現 (1)定義模型類 1 @interface App : NSObject 2 3 /**
Time of Update: 2014-11-27
ios – 使用UINib載入xib檔案實現UITableViewCellxib檔案的實質是xml,描述介面對象,每個對象都有一個很重要的屬性,identity inspector面板中class屬性,載入xib檔案的時候實際上是執行個體化介面對象相對應的這些class。 xib檔案的載入過程: 1.將xib檔案從磁碟載入記憶體,有兩種技術可以載入xib檔案:NSBundle和UINib。
Time of Update: 2014-11-26
[iOS基礎控制項,ios基礎控制項 A.從ViewController分離View 之前的代碼中,View的資料載入邏輯放在了總的ViewController中,增加了耦合性,應該對控制器ViewController隱藏資料載入到View的細節。 封裝View的建立邏輯 封裝View的資料載入邏輯到自訂的UIView中 B.思路
Time of Update: 2014-11-26
安卓開發中Spinner控制項的使用,安卓spinner 在安卓手機應用開發中,Spinner對象常用方法有以下五種。 用法 1 :以資源方式,靜態展示 Spinner 選項 用法 2 :以代碼方式,動態展示 Spinner 選項 用法 3
Time of Update: 2014-11-26
ios – 使用UINib載入xib檔案實現UITableViewCell,uinibxib xib檔案的實質是xml,描述介面對象,每個對象都有一個很重要的屬性,identity inspector面板中class屬性,載入xib檔案的時候實際上是執行個體化介面對象相對應的這些class。 xib檔案的載入過程: 1.將xib檔案從磁碟載入記憶體,有兩種技術可以載入xib檔案:NSBundle和UINib。