原创 iOS相關目錄整理備忘

iOS模擬器目錄:Users/your_user_name/Library/Application Support/iPhone Simulator/iOS_version/

原创 Scene is unreachable due to lack of entry points and does not have an identifier for runtime access

使用Storyboard時出現以下警告: warning: Unsupported Configuration: Scene is unreachable due to lack of entry points and does not

原创 關於顏色的整形表示

0xffff00ff是int類型的數據,分組一下0x|ff|ff00ff,0x是代表顏色整數的標記,ff是表示透明度,ff00ff表示顏色,注意:這裏ffff00ff必須是8個的顏色表示,不接受ff00ff這種6個的顏色表示。

原创 objective-c宏定義

1、先來幾個常用的: 01 // 是否高清屏 02  #define isRetina ([UIScreen instancesRespondToSelector:@selector(c

原创 Gentoo技巧總結

(1)臨時掛載boot # mount /boot 點贊 收藏 分享 文章舉報 freedom2028 發佈了28 篇原創文章 · 獲贊 13 · 訪問量 95萬+ 私信

原创 UILabel顯示換行的方法

UILabel*label;//設置換行label.lineBreakMode = UILineBreakModeWordWrap; label.numberOfLines = 0;換行符還是\n比如NSString * xstring=

原创 Objective-C 格式化輸出

%@ 對象 %d, %i 整數 %u 無符整形 %f 浮點/雙字 %x, %X 二進制整數 %o 八進制整數 %zu size_t %p 指針 %e 浮點/雙字 (科學計算) %g

原创 The entitlements specified in your application’s Code Signing Entitlements file do not match those

最近開發iPhone程序,獲得開發簽名後在真機器上部署測試,在點擊Build And Run後,提示The executable was signed with invalid entitlements.(The entitlement

原创 Android onCreate方法被調用兩次的解決方法

原因: 1. 橫豎屏旋轉2. 系統啓動後,搜索到可用移動網絡會觸發onCreate方法,在開啓應用程序後,碰到上面兩種情況會銷燬當前Activity,然後重啓一個新的Activity實例.解決方法:1. AndroidManifest.x

原创 setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key

其中一個變量或屬性(variable 或 property)已經和一個nib或storyboard文件進行了連接,但是後來在Xcode 開發環境,將該 變量或屬性名進行了更改。 如 UILabel *label; 更改爲 UILabe

原创 靜態庫調用問題彙總

程序運行時調用靜態庫中函數出現:unrecognized selector sent to instance 原因:將生成的simulator版本的靜態庫導入到工程中進行鏈接,囧rz 解決方法:在Edit Scheme中將Destinat

原创 VMware安裝Gentoo及注意事項

大體上按照官網的Handbook(英文版)安裝即可,有以下幾點注意下: (1)如果使用的virtual disk type時使用的是默認的SCSI時,需要在編譯內核的時候把下面這些模塊支持添加進去(直接編譯進內核[*]) -->Devi

原创 SSH連接時出現Host key verification failed的原因及解決方法

SSH連接的時候Host key verification failed. [root@cache001 swftools-0.9.0]# ssh 192.168.1.90 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

原创 NSString & NSMutableString

Immutable strings   //  Setup  two  variables  to  point  to  the  same  string  NSString * str1 = @"Hello World"; 

原创 Gentoo安裝VMwareTools

1. VMware的菜單【VM】->【Install VMware Tools】(也可以在Virtual Machine Settings的Hardware標籤下的CD/DVD下使用install-path-to-vmware/linux