代码改变世界

阅读排行榜

iOS 8.0后 UISearchController pop不隐藏

2016-08-31 15:43 by marysneaker, 1347 阅读, 收藏,
摘要: self.definesPresentationContext = YES; _searchController = [[UISearchController alloc]initWithSearchResultsController:nil]; _searchController.dimsBack 阅读全文

适配iOS 7 和iOS 8屏幕尺寸宏定义

2016-06-30 17:25 by marysneaker, 796 阅读, 收藏,
摘要: #define IS_IOS8_0 ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) #define WIDTH [UIScreen mainScreen].bounds.size.width #define HEIGHT [ 阅读全文

iOS textview光标上下跳动&&文本不置顶问题

2016-08-29 16:18 by marysneaker, 694 阅读, 收藏,
摘要: _textView.layoutManager.allowsNonContiguousLayout = NO; self.automaticallyAdjustsScrollViewInsets = NO; 阅读全文

Pad的界面布局好多时候都要做两套------横屏和竖屏,但在界面切换时,该让哪个布局显示就要判断了,有多种方法,我记录下我用的一种,感觉比较方便:

2015-08-12 10:56 by marysneaker, 581 阅读, 收藏,
摘要: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; //Get the notification centre for the app [nc addObserver:self //Add yourself as an ... 阅读全文

iOS imageview图片压缩变形

2016-09-01 20:40 by marysneaker, 341 阅读, 收藏,
摘要: http://www.cnblogs.com/someonelikeyou/p/4803406.html imageView.contentMode = UIViewContentModeScaleAspectFill; imageView.clipsToBounds = YES; 阅读全文