2016年4月20日
摘要: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appHasGoneInForeground:) name:UIApplicationWillEnterForegroundNotification o 阅读全文
posted @ 2016-04-20 11:41 X了个code 阅读(314) 评论(0) 推荐(0) 编辑
  2016年3月30日
摘要: 假如你创建一个tableView,返回的cell只有几行,不足以填充整个屏幕,这时你又在所创建的tableView上加了手势,那么如何让cell的点击事件与手势的点击事件不冲突呢?其实你只要做一个步骤:实现手势的代理方法如下 - (BOOL)gestureRecognizer:(UIGestureR 阅读全文
posted @ 2016-03-30 11:26 X了个code 阅读(1784) 评论(0) 推荐(0) 编辑
  2016年3月7日
摘要: - (void)viewDidLoad { [super viewDidLoad]; UIAlertView * alertV = [[UIAlertView alloc] initWithTitle:@"textfield" message:nil delegate:self cancelButt 阅读全文
posted @ 2016-03-07 17:14 X了个code 阅读(416) 评论(0) 推荐(0) 编辑
  2016年3月5日
摘要: 关于Xcode中的infoplist文件包含很多app的信息,比如app的项目名字,id及版本号等。比如我们在做版本新特性功能的时候,我们需要从中读取我们的版本号检测版本是否发生变化,如何读取infoplist中的版本号呢?代码如下: NSString * key = @"CFBundleVersi 阅读全文
posted @ 2016-03-05 10:50 X了个code 阅读(1766) 评论(0) 推荐(0) 编辑
  2016年2月29日
摘要: UILabel * label = [[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 195, 195)] autorelease]; label.text = htmlStr; label.textColor = [UIColor colorWithR 阅读全文
posted @ 2016-02-29 14:23 X了个code 阅读(429) 评论(0) 推荐(0) 编辑
  2016年2月17日
摘要: .h :头文件。头文件包含类,类型,函数和常数的声明。 .m :源代码文件。这是典型的源代码文件扩展名,可以包含Objective-C和C代码。 .mm :源代码文件。带有这种扩展名的源代码文件,除了可以包含Objective-C和C代码以外还可以包含C++代码。仅在你的Objective-C代码中 阅读全文
posted @ 2016-02-17 10:41 X了个code 阅读(826) 评论(0) 推荐(0) 编辑
  2016年2月2日
摘要: 最近在一项目中,在某个地方总是有内存闪退问题,经排查之后,终于找到问题所在。 项目中崩溃的地方使用单例写的(MRC模式),其中单例的初始化方法如下: + (GetCalendarEvents *)shareInstence { if (_get == nil) { _get = [[[GetCale 阅读全文
posted @ 2016-02-02 11:16 X了个code 阅读(315) 评论(0) 推荐(0) 编辑
  2015年9月7日
摘要: //导航控制器跳转到下一页 [self.navigationController pushViewController:second animated:YES]; //返回上一页 [self.navigationController popViewControllerAnimated:YES];... 阅读全文
posted @ 2015-09-07 21:41 X了个code 阅读(145) 评论(0) 推荐(0) 编辑