From abea63028d3d8b155106125097a84f565f1ad292 Mon Sep 17 00:00:00 2001 From: wojunfeng Date: Fri, 4 Sep 2015 10:30:24 -0400 Subject: [PATCH] ios new --- objc-speaking-grandma/FISAppDelegate.m | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/objc-speaking-grandma/FISAppDelegate.m b/objc-speaking-grandma/FISAppDelegate.m index 13dce12..b948f18 100644 --- a/objc-speaking-grandma/FISAppDelegate.m +++ b/objc-speaking-grandma/FISAppDelegate.m @@ -23,7 +23,39 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( * Write your code here! */ + NSString *talkToGrandma = @"HI, GRANDMA!"; + NSString *shoutAtGrandma = [talkToGrandma uppercaseString]; + BOOL shouting = [talkToGrandma isEqualToString:shoutAtGrandma]; + talkToGrandma = @"Hi, Grandma!"; + shoutAtGrandma = [talkToGrandma uppercaseString]; + + + // if (shouting) { + // NSLog(@"NO, NOT SINCE 1983!"); + // } else { + // NSLog(@"WHAT'S THAT? SPEAK UP, DEAR!"); + // } + // + // if ([talkToGrandma isEqualToString:shoutAtGrandma]) { + // NSLog(@"NO, NOT SINCE 1983!"); + // } else { + // NSLog(@"WHAT'S THAT? SPEAK UP, DEAR!"); + // } + // + if (!shouting) { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR!"); + } else { + NSLog(@"NO, NOT SINCE 1938!"); + } + + if (![talkToGrandma isEqualToString:shoutAtGrandma]) { + NSLog(@"WHAT'S THAT? SPEAK UP, DEAR!"); + } else { + NSLog(@"NO, NOT SINCE 1938!"); + } + + return YES; // Don't alter this statement. }