- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSString *requestURL = [[request URL] absoluteString];
if([requestURL rangeOfString:내 도메인].location == NSNotFound){
//내 도메인이 포함되지 않으면 아이폰 기본 브라우저로 오픈
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:requestURL] options:@{} completionHandler:nil];
return NO;
}else{
return YES;
}
}
'[ 모바일 관련 ] > 아이폰(iOS)' 카테고리의 다른 글
Autosynthesized property '변수' will use synthesized instance variable (0) | 2018.10.29 |
---|---|
SubView에서 MainView 객체 컨트롤하기 (0) | 2018.10.29 |
한글 인코딩 / 디코딩 (0) | 2018.10.29 |
나타났다 사라지는 토스트 메시지 (0) | 2018.10.29 |
URL 파라미터에 한글 인코딩 처리 (0) | 2018.10.23 |