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
NSCalendar* calendar=[NSCalendar currentCalendar]; | |
NSDateComponents* dateComps=[[NSDateComponents alloc] init]; | |
[dateComps setYear:2014]; | |
[dateComps setMonth:1]; | |
[dateComps setDay:21]; | |
NSDate* startDate=[calendar dateFromComponents:dateComps]; | |
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
//.h file | |
@property (nonatomic, strong) IBOutlet UIWebView *webView; |
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
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com"]]; |
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
UIAlertView *alert = [[UIAlertView alloc] | |
initWithTitle:@"Title goes here" | |
message:@"Message goes here?" | |
delegate:self | |
cancelButtonTitle:@"Cancel" | |
otherButtonTitles:@"other buttons go here, nil]; | |
[alert show]; | |
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex | |
{ |
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
IAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title goes here" message:@"Message goes here." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; | |
[alert show]; |