diff --git a/objc-speaking-grandma/FISAppDelegate.m b/objc-speaking-grandma/FISAppDelegate.m index 99c424e..4d17248 100644 --- a/objc-speaking-grandma/FISAppDelegate.m +++ b/objc-speaking-grandma/FISAppDelegate.m @@ -7,11 +7,32 @@ @implementation FISAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - /** - - * Write your code here! - - */ + NSString *talkToGrandma = @"Hello talking"; + NSString *shoutAtGrandma = [talkToGrandma uppercaseString]; + BOOL shouting = [talkToGrandma isEqualToString:shoutAtGrandma]; + if (shouting) { + NSLog(@"%@", @"NOT SINCE 1983!"); + } else { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR"); + } + + if ([talkToGrandma isEqualToString:shoutAtGrandma]) { + NSLog(@"%@", @"NOT SINCE 1983!"); + } else { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR"); + } + + if (!shouting) { + NSLog(@"%@", @"NOT SINCE 1983!"); + } else { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR"); + } + + if (![talkToGrandma isEqualToString:shoutAtGrandma]) { + NSLog(@"%@", @"NOT SINCE 1983!"); + } else { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR"); + } return YES; // Don't alter this statement. }