Time of Update: 2018-07-24
最近接手一個做了一年的老項目,拿到代碼後仔細一看,發現存在比較多的問題: 1.沒有使用svn、或 git 進行管理,所有更改都在本project上,其中問題顯而易見,需求在不斷添加或者修改的時候,很多都會被悄無聲息的被砍掉,沒有分支、版本的概念。 2.使用到了諸多優秀的第三方庫資源,但是沒有使用CocoaPods進行管理,這就存在一個第三方庫資源升級、再配置的問題;
Time of Update: 2018-07-24
+ (void)requestAppstoreVersionSuccess:(void(^)(id result))sucBack failed:(void(^)(id failResult))faiBack
Time of Update: 2018-07-24
廢話不多說上代碼,我們要建立一個UIViewController typedef enum : NSUInteger { Fade = 1, //淡入淡出 Push,
Time of Update: 2018-07-24
1、NSString為何要用copy。而不是strong/assign。 案例1: @interface Test () @property (nonatomic, strong) NSString *strongString; @property (nonatomic, copy) NSString *copyedString;@end@implementation-(void)test{ NSString *string = [NSString
Time of Update: 2018-07-24
xcode6.0升級到xcode6.1後,程式編譯報錯,錯誤如下:這是個很常見的錯誤,很多項目在更換xcode版本後,都會出現類似的問題。 Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_QQApiInterface", referenced from: objc-class-ref in AppDelegate.o
Time of Update: 2018-07-24
xcode6.0升級到xcode6.1後,程式編譯報錯,錯誤如下:這是個很常見的錯誤,很多項目在更換xcode版本後,都會出現類似的問題。 Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_QQApiInterface", referenced from: objc-class-ref in AppDelegate.o
Time of Update: 2018-07-24
轉載自:http://www.cnblogs.com/YouXianMing/p/3897543.html 從百度上搜尋了一下layoutSubviews的用處,以下是搜尋的結果,當然,筆者是會一一驗證的. 1、 init初始化不會觸發layoutSubviews 2、 addSubview會觸發layoutSubviews 3、 設定view的Frame會觸發layoutSubviews,當然前提是frame的值設定前後發生了變化
Time of Update: 2018-07-24
在使用UILabel存放字串時,經常需要擷取label的長寬資料,本文列出了部分常用的計算方法。 1.擷取寬度,擷取字串不折行單行顯示時所需要的長度 CGSize titleSize = [aString sizeWithFont:font constrainedToSize:CGSizeMake(MAXFLOAT, 30)]; 註:如果想得到寬度的話,size的width應該設為MAXFLOAT。
Time of Update: 2018-07-24
#define THEROWLENGTH 16 #define UnicodeSTART 9728 - 1 + ( NSString *)replaceUnicode:( NSString *)unicodeStr {
Time of Update: 2018-07-24
駁回問題資訊如下: Guideline 5.1.5 - Legal - Privacy - Location ServicesYour app uses location services but does not clarify the purpose of its use in the location modal alert. Apps that collect, transmit, or use location data must notify and obtain the
Time of Update: 2018-07-24
方法一:用三方的架構masonry [self.loginBtnmas_makeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(self.view.mas_width).multipliedBy(0.3)
Time of Update: 2018-07-24
@implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch.
Time of Update: 2018-07-24
iOS開發中@selector的理解與應用 @selector 是什麼: 1、一種類型 SEL 2、代表你要發送的訊息(方法), 跟字串有點像, 也可以互轉.: NSSelectorFromString() / NSSelectorFromString() 3、可以理解為類似函數指標的東西--是能讓Objective-C動態調用方法的玩意.--是 object-c 的動態後綁定技術 可以通過字串 訪問的函數指標
Time of Update: 2018-07-24
iOS:學習runtime的理解和心得 Runtime是想要做好iOS開發,或者說是真正的深刻的掌握OC這門語言所必需理解的東西。最近在學習Runtime,有自己的一些心得,整理如下, 一為 查閱方便 二為 或許能給他人一些啟發, 三為 希望得到大家對這篇整理不足之處的一些指點。 什麼是Runtime
Time of Update: 2018-07-24
UITabBarController * tab = [[UITabBarControlleralloc]init]; RootViewController * rootV = [[RootViewControlleralloc]init]; UINavigationController * nav = [[UINavigationControlleralloc]initWithRootViewController:rootV];
Time of Update: 2018-07-24
在AVFoundation架構中還要一個AVAudioRecorder類專門處理錄音操作,它同樣支援多種音頻格式。與AVAudioPlayer類似,你完全可以將它看成是一個錄音機控制類,下面是常用的屬性和方法: 屬性 說明 @property(readonly, getter=isRecording) BOOL recording; 是否正在錄音,唯讀 @property(
Time of Update: 2018-07-24
原文轉自:http://www.sufeinet.com/thread-8732-1-1.html 在我們編碼的過程中,總會發現有一些重複的編碼工作,可能你會不厭其煩的去copy and paste,但是你有去考慮過怎樣解決這樣的問題嗎。其實現在很多的編程IDE都能協助我們減少一些編碼的任務,提高編碼效率。今天我們就來學習下如何在Xcode中定義一些常用的code snippets吧。 其實在編程的過程中,相信很多小夥伴們都會用得到的,如下圖:
Time of Update: 2018-07-24
轉自:http://blog.csdn.net/hnsdwhl/article/details/46661541 這是為了收藏備用。 補充:Xcode7下,選中代碼後長按,滑鼠變箭頭後,拖到Code Snippet,然後再編輯儲存。 在做iOS開發的過程中,你會發現有些代碼在項目中需要反覆使用,在XCode裡面我們可以通過Code
Time of Update: 2018-07-24
iOS工程中刪除預設的並使用自建的ViewController後黑屏 老帥(http://blog.csdn.net/shuaihj) 現象 往往我們建立一個iOS工程後,會使用自訂的ViewController,而不是其內建的。作為第一次使用iOS開發的人來說,就會遇到一個問題,app啟動後黑屏,並沒有如預想的那樣顯示自訂的View。 查看錯誤資訊 Failed to instantiate the default view controller for
Time of Update: 2018-07-24
如果應用程式值需要儲存程式參數、選項相關的少量資料,則可使用NSUserDefaults進行儲存; 如果應用程式只是少量資料需要儲存,那使用屬性列表檔案就可以了;