티스토리 뷰

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
import UIKit
 
class ViewController: UIViewController, UIWebViewDelegate {
 
 
    @IBOutlet weak var webView: UIWebView!
    @IBOutlet weak var activityindicator: UIActivityIndicatorView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        activityindicator.hidden = true
        
        
        var url = NSURL(string: "https://www.google.com")
        
        var request = NSURLRequest(URL: url!)
        webView.loadRequest(request)
        
        
    
    }
 
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
 
    func webViewDidStartLoad(webView: UIWebView) {
        activityindicator.hidden = false
        activityindicator.startAnimating()
    }
    
    func webViewDidFinishLoad(webView: UIWebView) {
        activityindicator.hidden = true
        activityindicator.stopAnimating()
    }
}
cs


저작자 표시 비영리 변경 금지
신고
Creative Commons License
Creative Commons License
댓글
댓글쓰기 폼
공지사항
최근에 달린 댓글
Total
4,666
Today
12
Yesterday
97
링크
«   2017/06   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
글 보관함