随笔分类 - ios
摘要:获取项目中用的所有接口地址,然后排序、去重。 1, 接口地址分散在所有头文件或实现文件中,用grep命令在目录下进行遍历,指定文件类型为.h或.m: grep --include=\*.{m,h} -r '/rest[^"]*' ./directory; 2, 去掉文件路径名加-h可选项; 3, 去
阅读全文
摘要:Responding to Being Loaded from a Nib File 在实例化过程中,归档中的每个对象都被解归档然后依据对象的类型初始化。遵守NSCoding协议的对象(包括所有UIView和 UIViewController的子类)用initWithCoder:方法初始化。所有不遵
阅读全文
摘要:原文:https://spin.atomicobject.com/2014/03/05/uiscrollview-autolayout-ios/ Who says you can’t teach an old control some new tricks? The UIScrollView has
阅读全文
摘要:http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects ########################## .gitignore file for Xcode4 and Xcode5 Source pr
阅读全文
摘要:参考: http://stackoverflow.com/questions/2777438/how-to-tell-if-uiviewcontrollers-view-is-visibleif (viewController.isViewLoaded && viewController.view.
阅读全文
摘要:参考: http://nscookbook.com/2013/01/ios-programming-recipe-10-adding-a-shadow-to-uiview/ shadowOffset is a CGSize representing how far to offset the sha
阅读全文
摘要:参考: http://rypress.com/tutorials/objective-c/propertiesPropertiesAn object’s properties let other objects inspect or change its state. But, in a well-
阅读全文
摘要:参考: https://www.objc.io/issues/6-build-tools/cocoapods-under-the-hood/CocoaPods is a library dependency management tool for OS X and iOS applications.
阅读全文
摘要:UIScrollView的高度在xib中设置 需要固定的部分用代码添加: UIImageView *textLogo = [[UIImageView alloc] initWithFrame:CGRectMake((kMSScreenWith - 153)/2, (kMSScreenHeight -
阅读全文
摘要:参考:http://stackoverflow.com/questions/21031491/core-data-info-error-in-console-at-runtimeINFO: fetch-response is unable to open the file /Users/userNa
阅读全文
摘要:参考: http://guides.cocoapods.org/using/getting-started.html#installationCocoaPods is built with Ruby and it will be installable with the default Ruby a
阅读全文
摘要:value=nil时删除该item value=[NSNull null]时在iOS7.1的系统是否会引起crash?
阅读全文
摘要:原文:https://www.bignerdranch.com/blog/javascriptcore-example/ JavaScriptCore is not a new framework; in fact, it’s been lurking on Mac OS X ever since
阅读全文
摘要:参考: http://stackoverflow.com/questions/992348/reading-html-content-from-a-uiwebviewNSString *html = [yourWebView stringByEvaluatingJavaScriptFromStrin
阅读全文
摘要:参考: JavaScriptCore框架在iOS7中的对象交互和管理教程 http://blog.csdn.net/kaitiren/article/details/23256191 UIWebView 中JavaScript 与 Objective-C 通信 http://blog.csdn.ne
阅读全文
摘要:参考:http://stackoverflow.com/questions/14334047/how-to-call-javascript-function-in-objective-c [_webView stringByEvaluatingJavaScriptFromString:@"metho
阅读全文
摘要:self.bridge = [WebViewJavascriptBridge bridgeForWebView:self.webView]; 此时代理为self.bridge [self.bridge setWebViewDelegate:self]; 此时代理为self 如果self.webVie
阅读全文
摘要:showError: 会在[self.textfield resignFirstResponder];执行时隐藏不能达到显示2.5秒左右的效果 解决方法:延时执行隐藏键盘的代码,延时正好等于showError:显示时长 [self performSelector:@selector(hideKeyB
阅读全文
摘要:http://stackoverflow.com/questions/19274408/drawinrectwithattributes-vs-drawinrectwithfontlinebreakmodealignment- (void)drawRect:(CGRect)frame{ NSMuta
阅读全文
摘要:http://stackoverflow.com/questions/2694411/text-inset-for-uitextfieldmyTextField.layer.sublayerTransform = CATransform3DMakeTranslation(5, 0, 0); 占位符和
阅读全文

浙公网安备 33010602011771号