11 2014 档案
摘要://震动效果- (void)shake:(UIView *)view{ CGRect frame = view.frame; CAKeyframeAnimation *shakeAnimation = [CAKeyframeAnimation animationWithKeyPath:@...
阅读全文
摘要:CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小 UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView theView.backgr...
阅读全文
摘要:本文翻译自苹果的文档,有删减,也有添加自己的理解部分。如果有Block语法不懂的,可以参考fuckingblocksyntax,里面对于Block为了方便对比,下面的代码我假设是写在ViewController子类中的1、第一部分定义和使用Block,?12345678910111213141516...
阅读全文
摘要:http://my.oschina.net/yongbin45/blog/150149// 字符串:#ifndef nilToEmpty#define nilToEmpty(object) (object!=nil)?object:@""#endif #ifndef formatStringOfOb...
阅读全文
摘要:1.ARC和非ARC文件共存项目->Build Parses->对应的类1.1.新项目兼容老的非ARC:-fno-objc-arc1.2.老项目兼容ARC:-fobjc-arc
阅读全文
摘要:1 因为我用的xib实现的添加picker 和textfiled的,@interfaceViewController:UIViewController{UIToolbar*tool;//主要用这存放按钮}@property(retain,nonatomic)IBOutletUIDatePicker*...
阅读全文
摘要:timer=[NSTimerscheduledTimerWithTimeInterval:1.0target:selfselector:@selector(timerFireMethod:)userInfo:nilrepeats:YES];//倒计时方法验证码实现倒计时60秒,60秒后按钮变换开始的...
阅读全文
摘要:http://www.w3cplus.com/blog/tags/331.html?page=1
阅读全文
摘要:使用 convertRect: fromView: 或者 convertRect: toView:例如一个视图控制器的view中有一个UITableView,UITableView的某个cell中有个UITextField,想要得到UITextField在view中的位置,就要靠上面的两个方法了。用...
阅读全文
摘要:[[UIApplication sharedApplication] setStatusBarHidden:NO]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];//状态栏设置...
阅读全文