原创 將博客搬至51CTO

將博客搬至51CTO

原创 UIButton小結

1.創建 + buttonWithType: // 創建並返回一個特定風格的按鈕  2.設置標題   buttonType  property   titleLabel  property // 顯示按鈕當前標題的視圖(只讀).雖然它是隻讀

原创 static、const

時常在單例模式中看到static關鍵字,不明就裏照搬總歸無法理解其中的奧義,今天又寫到單例決心已定要明白static的道理於是查看文檔,如下:static關鍵字前面的局部變量通常都在每次程序進入該局部變量的作用域時分配並在離開時釋放。這類存

原创 iOS關閉鍵盤的兩種簡單方法

方法一:    //1, 關閉鍵盤    [[[UIApplication sharedApplication] keyWindow] endEditing:YES];  方法二:   //2, 關閉鍵盤    [[self findFir

原创 Xcode 的正確打開方式——Debugging

程序員日常開發中有大量時間都會花費在 debug 上,從事 iOS 開發不可避免地需要使用 Xcode。這篇博客就主要介紹了 Xcode 中幾種能夠大幅提升代碼調試效率的方式。“If debugging is the process of

原创 iOS關閉鍵盤的兩種簡單方法

方法一:    //1, 關閉鍵盤    [[[UIApplication sharedApplication] keyWindow] endEditing:YES];  方法二:   //2, 關閉鍵盤    [[self findFir

原创 Xcode 的正確打開方式——Debugging

程序員日常開發中有大量時間都會花費在 debug 上,從事 iOS 開發不可避免地需要使用 Xcode。這篇博客就主要介紹了 Xcode 中幾種能夠大幅提升代碼調試效率的方式。“If debugging is the process of

原创 UIButton小結

1.創建 + buttonWithType: // 創建並返回一個特定風格的按鈕  2.設置標題   buttonType  property   titleLabel  property // 顯示按鈕當前標題的視圖(只讀).雖然它是隻讀

原创 Xcode正確的Debugging方法

程序員日常開發中有大量時間都會花費在 debug 上,從事 iOS 開發不可避免地需要使用 Xcode。這篇博客就主要介紹了 Xcode 中幾種能夠大幅提升代碼調試效率的方式。“If debugging is the process of

原创 UICollectionview Xib 行間距

xib設置UICollectionviewCell MIn Spacing For Lines屬性這樣做法不能保證美工切圖標註的間距,還需要用代碼調整-(CGFloat )collectionView:(UICollectionView *

原创 調用app stroe

NSString * const App_URL = @"https://itunes.apple.com/cn/app/you-fan/id977919857?mt=8";[[UIApplication sharedApplication

原创 ARC 導入 MRC文件

ARC工程中使用MRC的類:在targets的build phases選項下Compile Sources下選擇要不使用arc編譯的文件,雙擊它,輸入 -fno-objc-arc 即可MRC工程中也可以使用ARC的類。方法如下:在targe

原创 將博客搬至51CTO

將博客搬至51CTO

原创 Build Settings/Linking/Other Linker Flags

1> Problem was caused: Objective-C does not define linker symbols for each function (or method, in Objective-C) - instea

原创 No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VA

錯誤代碼:No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s)