Time of Update: 2015-05-09
iOS programming UITabBarController,uitabbarcontrolleriOS programming UITabBarController1.1 View controllers become more interesting when the user's actions can cause another view controller to be presented.當使用者的action 能導致其他view controller 展現,view
Time of Update: 2015-05-08
UITabBarController(標籤欄控制器),uitabbarcontroller一、標籤欄控制器的基本概念 UITabBarController 繼承於視圖控制器,通過標籤欄項的形式來管理檢視控制器,各個標籤欄項之間的視圖控制器彼此獨立,互不影響。
Time of Update: 2015-05-07
iOS UISearchController的使用- (void)viewWillAppear:(BOOL)animated{[super viewWillAppear:animated];[self setTabBarHidden:YES withAnimation:YES];}- (void)viewWillDisappear:(BOOL)animated{[super
Time of Update: 2015-05-07
IOS開發複製的總結(深拷貝淺拷貝區別)1.複製可變字串 NSMutableString * city = [NSMutableString stringWithString:@"北京"]; //複製可變副本 NSMutableString * cityCopy = [city mutableCopy]; //修改副本 [cityCopy
Time of Update: 2015-05-06
Objective-C Memory Management Being Exceptional 異常處理與記憶體,memorymanagementObjective-C Memory Management Being Exceptional 異常處理與記憶體3.1Cocoa requires that all exceptions must be of type NSExceptioncocoa 需要所有的異常是NSException類型的。so even though you
Time of Update: 2015-05-06
單例,單例模式#import <Foundation/Foundation.h>@interface Student : NSObject@property(retain,nonatomic)NSString *name;@property(assign,nonatomic)int age;//設計單利模式//+(類名*)shareXXX// defaultXXX// xxx+(Student *)shareStudent;@end#import
Time of Update: 2015-05-05
iOS動畫——ViewAnimations 這一篇我們來說說UIKit中的動畫API,期中包括: UIView.UIView.animateWithDuration UIView.transitionWithView UIView.animateKeyframesWithDuration UIView.addKeyframeWithRelativeStartTime 今天的故事就將圍繞這些API展開,闡述他的前世今生。 UIKit動畫API使用起來十分簡單與方便,他避免
Time of Update: 2015-05-05
IOS --- NSFetchResultsControllerNSFetchedResultsController和UITableView整合起來處理資料具有強大的靈活性。首先得到的好處是不需要將資料記錄進行分頁,不然,按照傳統的做法,需要先查詢出總的記錄,然後再從紀錄裡面過濾,這樣會進行兩次操作,對記憶體消耗很大,處理不好,程式甚至可能崩潰。使用NSFetchedResultsController類不僅簡單,還具有更高的效能,這個類自動協助你記錄分頁的事情,得到表對應的Core
Time of Update: 2015-05-04
iOS載入動態圖的兩種方法一 view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];NSString *imagePath =[[NSBundle mainBundle] pathForResource:@"csjg" ofType:@"gif"];CGImageSourceRef cImageSource = CGImageSourceCreateWithURL((__
Time of Update: 2015-04-30
iOS隱藏狀態列iOS之後想要操作頂部狀態列就不是太容易了,操作步驟如下:首先在info.plist檔案中添加View controller-based status bar appearance項,一. View controller-based status bar appearance項設為YES,則View controller對status bar的設定優先權高於application的設定。這時 view controller中對status
Time of Update: 2015-04-26
黑馬程式員---autorelease方法,黑馬---autorelease------Java培訓、Android培訓、iOS培訓、.Net培訓、期待與您交流! -------基本用法;1,autorelease 方法會返回對象本身2,調用完autorelease方法後,對象的計數器不變2,autorelease
Time of Update: 2015-04-27
IOS:UI設計之UITextField相關基礎,iosuitextfield 簡單說明:此控制項一般用於使用者的賬戶,密碼,驗證碼等需要輸入簡短內容的輸入視窗 (由於剛剛學完控制項部分,所以最近幾篇都是關於各控制項的介紹..)UITextView與UITextField間的主要區別在於:UITextField可以設定InputText的相關屬性,例如可以設定SecureInput等相關屬性,而UITextView只能實現基本的文本輸入的功能,幾乎無法設定內容屬性。U
Time of Update: 2015-04-25
iOS 限制錄音時間為30秒static int myTime = 30;@interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@property (weak, nonatomic) IBOutlet UIButton *btn;@property (weak, nonatomic) IBOutlet UIButton *playBtn;@property
Time of Update: 2015-04-25
CoreLocation---iOS中的位置資訊在iOS系統中, 使用CoreLocation可以擷取到使用者當前位置, 以及裝置移動資訊.基本步驟:import CoreLocation, ViewController 繼承 CLLocationManagerDelegate 協議, 實現CLLocationManager的didUpdateLocations, didUpdateToLocation等方法, 開始定位:
Time of Update: 2015-04-25
iOS開發 -
Time of Update: 2015-04-24
Xcode常用快速鍵,xcode快速鍵建立 shift + cmd + n 建立項目 cmd + n 建立檔案 視圖 option + cmd + 斷行符號 開啟助理編輯器 cmd + 斷行符號 顯示主視窗 cmd + 0
Time of Update: 2015-04-24
使用AutoLayOut為UIScrollView添加約束圖解及要點,uiscrollview1.在ViewController中拖入1個UIScrollView,並為其添加約束約束為上下左右四邊與superview對齊2.在scrollview中,拖入1個UIView,為了便於區分將其設為橙色。3.為view添加約束約束為上下左右四邊與superview對齊添加完這些約束後,我們發現出現了錯誤,不要理會 4.為view添加寬度約束,本例中,想達到的效果是scrollView可以豎向滾
Time of Update: 2015-04-23
關於目前自己iOS項目使用的第三方開源庫,ios項目第三方開源1.AFNetworking 目前比較推薦的iOS網路請求組件,預設網路請求是非同步,通過block回調的方式對返回資料進行處理。 2.FMDB 對sqlite資料庫操作進行了封裝,demo也比較簡單。 3.MBProgressHUD 也是iOS項目常用的一個組件,用於顯示過渡效果的,比如網路請求之前顯示loading,網路結束隱藏loading。建議封裝在BaseViewController中,所有View
Time of Update: 2015-04-22
iOS開發系列之常用自訂控制項開發集—自訂選項按鈕或者多選按鈕控制項開發在我們實際開發中我們做登陸或者註冊功能時往往需要勾選某個協議這個時候就需要用到CheckBox按鈕,CheckBox是pc或者android上得控制項ios沒有,所以需要我們自訂。WHC_RadioButton.h標頭檔如下://// WHC_RadioButton.h// CTBMobileBank//// Created by 吳海超 on 15/4/1.////#import #define
Time of Update: 2015-04-21
UIButton-初識IOS,uibutton-ios今天,我學到了所有app經常用到的UIButton控制項,廢話不多說,這些都是我學習的時候總結的一些,希望可以幫到以後的初學者,IOS初學不應該直接拖拽,感覺不易於理解,所以我總結的基本上全是純程式碼編輯最重要的初始化:初始化,無非就是分配空間,定義大小。基本上所有的語言初始化都是這樣。 //定義一個button按鈕 UIButton *Button = [[UIButton