Created
October 31, 2014 08:04
-
-
Save RyanBreaker/592532a5e6bd6d69cb81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| - (IBAction)displayDay:(id)sender { | |
| NSDate *chosen = [self.datePicker date]; | |
| NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; | |
| [formatter setDateFormat:@"EEEE"]; | |
| NSString *day = [formatter stringFromDate:chosen]; | |
| NSString *msg = [[NSString alloc] initWithFormat:@"That's a %@.", day]; | |
| UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"What day is that?" | |
| message:msg | |
| delegate:nil | |
| cancelButtonTitle:@"Okay" | |
| otherButtonTitles:nil, nil]; | |
| [alert show]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment