代码改变世界

iOS imageview图片压缩变形

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

iOS 8.0后 UISearchController pop不隐藏

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

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

2016-08-29 16:18 by marysneaker, 672 阅读, 0 推荐, 收藏, 编辑
摘要:_textView.layoutManager.allowsNonContiguousLayout = NO; self.automaticallyAdjustsScrollViewInsets = NO; 阅读全文

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

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

关于storyboard Scene is unreachable due to lack of entry points and does not have an identifier for runtime access报警

2016-04-01 10:04 by marysneaker, 201 阅读, 0 推荐, 收藏, 编辑
摘要:1.检查 isinitial viewcontroller 选项是否选中(程序默认加载的控制器). 2.如图,故事版中有个vc 没有任何指向,也会出现该警告。 阅读全文

自建静态库兼容64位

2016-02-05 10:25 by marysneaker, 247 阅读, 0 推荐, 收藏, 编辑
摘要:armv7是支持比iphone5旧的那些设备,armv7s是iphone5或ipad4或者以后的新设备,i386是mac的。 lipo -info XXX.a 检查静态库的兼容性 lipo -create XXXX_V7.a XXXX_V7s.a -output XXXX_all.a 合成新的.a文 阅读全文

iOS 截屏

2015-10-23 15:54 by marysneaker, 160 阅读, 0 推荐, 收藏, 编辑
摘要://(1)设置要截屏的图片的大小 UIGraphicsBeginImageContextWithOptions(某个view.frame.size,NO,0); //不模糊// UIGraphicsBeginImageContext(self.view.frame.size); //模糊 /... 阅读全文

iOS 国际化

2015-10-20 14:58 by marysneaker, 145 阅读, 0 推荐, 收藏, 编辑
摘要:command+n 创建strings file文件。命名为Localizable.strings ,点击Localizable.strings 查看右边属性,选择localize。项目->project-》info-》localizations,添加需要的语言。在Localizable.strin... 阅读全文

floor()函数

2015-10-20 14:30 by marysneaker, 179 阅读, 0 推荐, 收藏, 编辑
摘要:floor()函数向下取整floor(1.5)=1;floor(1)=1; 阅读全文

关于uitableviewcell的accessoryType属性

2015-08-17 11:16 by marysneaker, 280 阅读, 0 推荐, 收藏, 编辑
摘要:cell.accessoryType=UITableViewCellAccessoryNone;//cell没有任何的样式cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;//cell的右边有一个小箭头,距离右边有十几像素;... 阅读全文