결과 화면
파일 두개를 이렇게 해준다.
//
// ViewController.h
// webview_160411
//
// Created by Mac on 2016. 4. 11..
// Copyright © 2016년 tester. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
{
IBOutlet UIWebView *webView;
}
@end
///=============
//
// ViewController.m
// webview_160411
//
// Created by Mac on 2016. 4. 11..
// Copyright © 2016년 tester. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[webView loadRequest:[NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://naver.com"]
]
];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
//============
viewController 연결한 부분
첨부파일. ==> ios에서만 되고 xcode가 설치 되어있어야 실행됩니다.
160411_webview.zip
'ios' 카테고리의 다른 글
(ios) Xcode - 버튼 누르면 사이트 이동 (0) | 2016.04.15 |
---|---|
(ios) Xcode - 구글맵 나오게 하기 (0) | 2016.04.15 |
(ios) Xcode - Swift에서 버튼 누르면 레이블에 글자 나오게 하기 (0) | 2016.04.15 |
(ios) Xcode - Playground에서 클래스 만드는 방법 (0) | 2016.04.15 |
(ios) Xcode - Playground에서 함수 사용방법 세번째 (0) | 2016.04.15 |