Skip to content

iOS开发笔记

1 xCode调出Archives界面:window -> organizer
2 webview
[code lang=”swift”]
class ViewController: UIViewController {
@IBOutlet weak var webview: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// 1.设置访问资源 – 百度搜索
let url = URL(string: "http://feizhaojun.com");

// 2.建立网络请求
let request = URLRequest(url: url!);

// 3.加载网络请求
webview.loadRequest(request)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
[/code]

发送http请求
因为xCode7开始,默认发送https请求,所以需要修改Info.plist:Open As source code,添加:
[code lang=”html”]
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
[/code]

领支付宝红包:打开支付宝搜索 726845401

领饿了么红包:0fυィ直文本 e:/$XGzEgR8$~.👉饿了么App👈【快來領外賣紅包,最高20元,人人都有哦~】

 

您的赞助将会鼓励作者技术文章创作以及支持本站运维。

发表评论

Your email is never published nor shared. Required fields are marked *


TOP