This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; | |
[ud setFloat:value forKey:"ShowValue"]; | |
BOOL successful = [ud synchronize]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; | |
NSMutableDictionary *userInfo = [ud valueForKey:@"USER_INFO"]; | |
[userInfo setObject:@"SAMPLE" forKey:@"A"]; | |
[ud setValue:userInfo forKey:@"USER_INFO"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { | |
if (navigationType == UIWebViewNavigationTypeLinkClicked) { | |
NSString *checkURL = [request.URL absoluteString]; | |
NSRange linkMatch = [checkURL rangeOfString:@"http://example.com"]; | |
if (linkMatch.location != NSNotFound) { | |
[[UIApplication sharedApplication] openURL:request.URL]; | |
return NO; | |
} | |
} |