1.__weak 的宏定義
#define WeakObj(o) autoreleasepool{} __weak typeof(o) o##Weak = o
NSLog宏的定義:
#define NSLog(format, ...) do { \
fprintf(stderr, "<%s : %d> %s\n", \
[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], \
__LINE__, __func__); \
(NSLog)((format), ##__VA_ARGS__); \
fprintf(stderr, "-------\n"); \
} while (0)
2.Pods導(dǎo)入的文件如果不能引用
簡單辦法:
3.NSArray的擴(kuò)展對tableView的每個cell內(nèi)容獲取的空處理
- (id)objectAtIndexCheck:(NSUInteger)index
{
if(index >= [selfcount]) {
returnnil;
}
idvalue = [selfobjectAtIndex:index];
if(value == [NSNullnull]) {
returnnil;
}
returnvalue;
}
3.對于Profile文件內(nèi)獲取不到對應(yīng)設(shè)備UUID的處理
在Xcode 6.2中遇到Y(jié)our build settings specify a provisioning profile with the UUID, no provisioning profile was found錯誤
1.找到項(xiàng)目中的**.xcodeproj文件愧口,點(diǎn)擊右鍵惹挟,或者直接點(diǎn)擊項(xiàng)目名稱,右鍵?show?in?finder?(打開包內(nèi)容)扁达。
2.打開后找到project.pbxproj文件若厚,用文本編輯器打開裙士。其實(shí)就是右鍵心剥,點(diǎn)擊open就好了征堪。
3.打開這個文件后瘩缆,按command+F,在這個文件中查找“PROVISIONING_PROFILE",找到和這個“
PROVISIONING_PROFILE?=?"487F3EAC-05FB-4A2A-9EA0-31F1F35760EB";
"PROVISIONING_PROFILE[sdk=iphoneos*]"?=?"487F3EAC-05FB-4A2A-9EA0-31F1F35760EB";”類似的都刪除。
4.然后保存文件舌仍,重新打開項(xiàng)目赃额。xcode會提示你重新下載安裝provisioning?profile文件。下載后安裝上就可以熟尉。
PS:我在xcode6.2中,嘗試過
4. 通常引用RAC時會報(bào)swift引用的錯誤