Last active
August 29, 2015 13:57
-
-
Save shto/9549594 to your computer and use it in GitHub Desktop.
main method for demonstrating copy awesomeness
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
#import "ShoppingCart.h" | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
ShoppingCart *cart = [[ShoppingCart alloc] init]; | |
cart.couponCode = @"1235AB1"; | |
NSMutableArray *items = [[NSMutableArray alloc] init]; | |
[items addObjectsFromArray:@[@"Book", @"Guitar", @"Sweater", @"Coffee Pot"]]; | |
cart.items = items; | |
NSLog(@"Our Items before removing: %@", items); | |
NSLog(@"Cart Items before removing: %@", cart.items); | |
[items removeObjectAtIndex:1]; | |
NSLog(@"Our Items after removing: %@", items); | |
NSLog(@"Cart Items after removing: %@", cart.items); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment