随笔分类 -  iOS

摘要:当我们归档自定义对象的时候,可以重写自定义Model的的encodeWithCoder和initWithCoder 开始的大概是这样的,当属性非常多的时候 这种方式就会觉得不还好 好像重复在做一样的事情 其实这块我们可以交给runtime来做 用runtime来实现上面的功能 阅读全文
posted @ 2016-04-06 11:31 嗷大喵 阅读(425) 评论(0) 推荐(0)
摘要:安装homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 卸载homebrew ruby -e "$(curl -fsSL https://raw.gith 阅读全文
posted @ 2016-03-25 22:13 嗷大喵 阅读(465) 评论(0) 推荐(0)
摘要:reason: '*** -[AVAssetWriterInputPixelBufferAdaptor initWithAssetWriterInput:sourcePixelBufferAttributes:] Cannot create a new pixel buffer adaptor wi 阅读全文
posted @ 2016-03-04 15:40 嗷大喵 阅读(490) 评论(0) 推荐(0)
摘要:NSDictionary *param = @{@"key1":@"value1",@"key2":@"value2"};NSError *parseError = nil; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:... 阅读全文
posted @ 2016-01-25 18:06 嗷大喵 阅读(8095) 评论(0) 推荐(0)
摘要:-(void)uploadImages:(NSArray *)images atIndex:(NSInteger)index token:(NSString *)token uploadManager:(QNUploadManager *)uploadManager keys:(NSMutableA... 阅读全文
posted @ 2016-01-13 16:22 嗷大喵 阅读(2581) 评论(0) 推荐(1)
摘要:UICollectionViewFlowLayout has cached frame mismatchThis is likely occurring because the flow layout subclass MyLineLayout is modifying attributes ret... 阅读全文
posted @ 2016-01-05 11:22 嗷大喵 阅读(958) 评论(0) 推荐(0)
摘要:Xcode6 只支持iOS7和iOS8的模拟器Xcode7 只支持iOS9和iOS8的模拟器Xcode 并不会识别 SDKs 目录下的模拟器,我经过一些尝试以后,发现要放在这个目录下:/Library/Developer/CoreSimulator/Profiles/Runtimes/注意:是根目录... 阅读全文
posted @ 2015-10-22 15:43 嗷大喵 阅读(1766) 评论(0) 推荐(0)
摘要:解决方法可以在自定义的TabbarViewController里viewDidLoad方法里self.view.backgroundColor = [UIColor whiteColor];如果没有自定义tabbarController的话可以这样self.navigationController.... 阅读全文
posted @ 2015-09-06 21:38 嗷大喵 阅读(337) 评论(0) 推荐(0)
摘要:处理锯齿当然要用抗锯齿,iOS 可以通过修改 Plist 实现全局抗锯齿,但是这样容易出现性能问题。所以就要使用对单个 Layer 开启抗锯齿的方法layer.allowsEdgeAntialiasing = true摘自:《Producter》 阅读全文
posted @ 2015-08-30 20:37 嗷大喵 阅读(647) 评论(0) 推荐(0)
摘要:SDWebImage本身就已经支持了webp格式的图片1.下载libwebphttps://github.com/webmproject/libwebp然后你需要先安装好有homebrew或者macports安装homebrewh很简单,执行一条命令即可ruby -e "$(curl -fsSL h... 阅读全文
posted @ 2015-06-08 22:51 嗷大喵 阅读(1738) 评论(0) 推荐(0)
摘要:调用contextWithOptions:和createCGImage: fromRect:方法创建CIContext。与以往不同的地方是CIImage没有frame与bounds属性;只有extent属性。你将非常频繁的使用这个属性作为createCGImage: fromRect:方法的第二个参... 阅读全文
posted @ 2015-05-28 18:31 嗷大喵 阅读(1104) 评论(0) 推荐(0)
摘要:defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID获取新版xcode的uuidXcode6.3.2显示E969541F-E6F9-4D25-8158-72DC3545A6C6find ~/Lib... 阅读全文
posted @ 2015-05-27 09:48 嗷大喵 阅读(392) 评论(0) 推荐(0)
摘要:方法1:UInt32 audioRoute = kAudioSessionOverrideAudioRoute_Speaker;AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(audioRoute), ... 阅读全文
posted @ 2015-05-22 00:08 嗷大喵 阅读(1445) 评论(0) 推荐(0)
摘要:UITextPosition* beginning = _commentTextView.beginningOfDocument; UITextRange* selectedRange = _commentTextView.selectedTextRange; UITextPo... 阅读全文
posted @ 2015-05-06 11:02 嗷大喵 阅读(956) 评论(0) 推荐(0)
摘要:https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex找到里面的文档下载地址例如iOS 8.3的离线文档下载地址,把地址复制下来用迅雷下载就快多了https://devimages.apple.c... 阅读全文
posted @ 2015-04-28 22:05 嗷大喵 阅读(973) 评论(0) 推荐(0)
摘要:文件Base64以后会翻倍的涨,例如一张52kb的图片 base64以后string文件大小为185kb,在通过string转回图片为135kb图片转文字:UIImage *_originImage = [UIImage imageNamed:@"0.jpg"]; NSData *_data = U... 阅读全文
posted @ 2015-04-27 22:40 嗷大喵 阅读(1391) 评论(0) 推荐(0)
摘要:~/Library/Developer/Xcode/UserData/FontAndColorThemes~/Library/Developer/Xcode/UserData/CodeSnippetsXcode6备份这2个目录即可 阅读全文
posted @ 2015-04-13 13:49 嗷大喵 阅读(421) 评论(0) 推荐(0)
摘要:fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't map input file: xxxFramework.framework... 阅读全文
posted @ 2015-04-10 23:40 嗷大喵 阅读(12972) 评论(0) 推荐(1)
摘要:#define singleton_interface(className) \+ (className *)shared##className;// @implementation#define singleton_implementation(className) \static classNa... 阅读全文
posted @ 2015-04-08 23:16 嗷大喵 阅读(278) 评论(0) 推荐(0)
摘要:UIView *cutView = self.view.window.rootViewController.view; //截图 //开启上下文 UIGraphicsBeginImageContextWithOptions(cutView.frame.size, YES, 0.... 阅读全文
posted @ 2015-04-07 19:09 嗷大喵 阅读(162) 评论(0) 推荐(0)