摘要:
注意:接受通知要写在 viewDidLoad 方法里面取得系统全局的唯一广播站NSNotificationCenter *notification = [NSNotificationCenter defaultCenter];设置广播的名字和 参数等。。。[notification postNoti... 阅读全文
摘要:
NO -------是自身View下面的按钮之类的能点YES------是View自身的按钮能点击,他下面的不能点击 阅读全文
摘要:
Viewcontroller 的所有生命周期函数 重写时 一定要先写 父类 方法 就是(super +生命周期函数)LoadViewViewDidLoadViewDidUnload: 在iOS6以后此方法 已经不能用了 即使能用因为不能手动调用 只是在系统内存比较低得时候 系统自动调用 释放View... 阅读全文
摘要:
#define kColor(r,g,b,a) [UIColor colorWithRed:(r/255.0f) green:(g/255.0f) blue:(b/255.0f) alpha:a]//在.a文件中取东西#define PayBundle @"PayBundle.bundle"#def... 阅读全文
摘要:
UIView *touched = [self.view hitTest:pt withEvent:event];Uiview *touchView = [pt view]; 阅读全文
摘要:
- (NSString*)simulateAndRenderScene{ NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; NSTimeInterval a=[dat timeIntervalSince1970]*1000; NSStrin... 阅读全文
摘要:
#defineNSAssert(condition,desc,...)只有条件condition满足,才会执行下一个语句,否则输出断言错误。例如:NSAssert(1!=2,@"1怎么会等于2");当1等于2时,执行该程序就Xcode就会报错 阅读全文
摘要:
[arr enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { NSLog(@"obj数组的元素%@ idex数组的元素下标%lu",obj,(unsigned long)idx);}]; 阅读全文
摘要:
if ([self respondsToSelector:success]){ [self performSelector:success withObject:dictJson];} 阅读全文
摘要:
NSString *doc=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];NSString *fileName=[doc stringByAppendingPa... 阅读全文