iOS开发学习路线 +技巧整理

栏目: IOS · 发布时间: 6年前

内容简介:其实自学编程并不难,自学iOS移动开发也不是很难。iOS拥有强大的开发工具IDE Xcode,Xcode是开发OS X 和 iOS 应用程序的最快捷的方式。Xcode 具有统一的用户界面设计,编码、测试、调试都在一个简单的窗口内完成。简单的界面构建器Interface Builder(简称IB)通过鼠标拖拽就可以快速构建APP UI,甚至完全不需要真机调试,拖什么样,真机就表现成什么样。分享一套完整的iOS学习路线图:

其实自学编程并不难,自学iOS移动开发也不是很难。

iOS拥有强大的开发工具IDE Xcode,Xcode是开发OS X 和 iOS 应用程序的最快捷的方式。Xcode 具有统一的用户界面设计,编码、测试、调试都在一个简单的窗口内完成。简单的界面构建器Interface Builder(简称IB)通过鼠标拖拽就可以快速构建APP UI,甚至完全不需要真机调试,拖什么样,真机就表现成什么样。

分享一套完整的iOS学习路线图:

清晰版大图 地址:https://github.com/shaojiankui/iOS-Route

iOS开发学习路线 +技巧整理 iOS开发学习路线 +技巧整理

OS开发技巧分享

1、pod Analyzing dependencies:

pod install —verbose —no-repo-update
pod update —verbose —no-repo-update

2、git SourceTree 超前某个版本,落后某个版本:

find . -name .DS_Store -print0 | xargs -0git rm -f —ignore-unmatchgit clean -d -fx ""git commit -am 'Conflicts resolved'

3、git配置多个SSH:

http://www.jianshu.com/p/1fa5f8b21521

4、设置webview 请求头:

NSString *userAgent = [[[UIWebView alloc] init] stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];NSString *appName = @"app";NSString *customUserAgent = [userAgent stringByAppendingFormat:@" %@/1.0", appName];[[NSUserDefaults standardUserDefaults] registerDefaults:@{@"UserAgent":customUserAgent}];

5、webview 获取title url:

NSString *title = [webView stringByEvaluatingJavaScriptFromString:@”document.title”];
NSString *url = [webview stringByEvaluatingJavaScriptFromString:@”document.location.href”];

6、字符串编码解码,解决iOS中的中文unicode编码问题:

https://github.com/zhangqihu/CDUrlDecode.git

7、webview js互调:

js执行OC代码:js是不能执行OC代码的,但是可以变相的执行,js可以将要执行的操作封装到网络请求里面,然后OC拦截这个请求,获取url里面的字符串解析即可,代理: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

OC调取写好的js代码:UIWebView方法 stringByEvaluatingJavaScriptFromString

8、设置状态栏为白色:

// Swiftoverride func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.LightContent; }// OC- (UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent;}

9、iOS获取剪贴板的内容:

NSString *pasteUrl = [UIPasteboard generalPasteboard].string;

以上所述就是小编给大家介绍的《iOS开发学习路线 +技巧整理》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

The Linux Command Line

The Linux Command Line

William E. Shotts Jr. / No Starch Press, Incorporated / 2012-1-17 / USD 39.95

You've experienced the shiny, point-and-click surface of your Linux computer-now dive below and explore its depths with the power of the command line. The Linux Command Line takes you from your very ......一起来看看 《The Linux Command Line》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试