Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug fixes

  • Loading branch information...
commit 1a1caf8cfdee236e66c82e0425b9618dae131af7 1 parent ac710a8
Joseph Pieper authored
2  GameDayTweets/DetailViewController.m
View
@@ -203,7 +203,7 @@ -(void)displayLists:(NSDictionary *)dict
tweetToAdd.text = [tweet objectForKey:@"text"];
tweetToAdd.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[[tweet objectForKey:@"user"] objectForKey:@"profile_image_url"]]]];
- NSDate *tmp= [formatter dateFromString:(NSString *)[tweet objectForKey:@"created_at"]];
+// NSDate *tmp= [formatter dateFromString:(NSString *)[tweet objectForKey:@"created_at"]];
tweetToAdd.tweetTime = [formatter dateFromString:(NSString *)[tweet objectForKey:@"created_at"]];
tweetToAdd.user = [tweet objectForKey:@"from_user"];
12 GameDayTweets/MasterViewController.m
View
@@ -130,8 +130,8 @@ - (void)loadGames
NSString* gameAttributeString = [[NSString alloc] init];
NSArray* gameAttributeArray = [[NSArray alloc] initWithArray:[contents componentsSeparatedByString:@","]];
- homeTeamArray = [[NSArray alloc] init];
awayTeamArray = [[NSArray alloc] init];
+ homeTeamArray = [[NSArray alloc] init];
gameTimeArray = [[NSArray alloc] init];
int i = 0;
@@ -141,20 +141,20 @@ - (void)loadGames
gameAttributeArray = [gameAttributeString componentsSeparatedByString:@","];
GDTGame *game = [[GDTGame alloc] init];
- game.HomeTeam = [gameAttributeArray objectAtIndex:0];
- game.AwayTeam = [gameAttributeArray objectAtIndex:1];
+ game.AwayTeam = [gameAttributeArray objectAtIndex:0];
+ game.HomeTeam = [gameAttributeArray objectAtIndex:1];
game.GameTime = [gameAttributeArray objectAtIndex:2];
game.IsAvailableToWatch = true;
NSEntityDescription *gameEntity = [NSEntityDescription entityForName:@"Game" inManagedObjectContext:self.managedObjectContextGame];
NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[gameEntity name] inManagedObjectContext:gameContext];
[newManagedObject setValue:[NSString stringWithFormat:@"%d",i] forKey:@"gameNum"];
- [newManagedObject setValue:game.HomeTeam forKey:@"HomeTeam"];
[newManagedObject setValue:game.AwayTeam forKey:@"AwayTeam"];
+ [newManagedObject setValue:game.HomeTeam forKey:@"HomeTeam"];
[newManagedObject setValue:game.GameTime forKey:@"GameTime"];
- homeTeamArray = [homeTeamArray arrayByAddingObject:[gameAttributeArray objectAtIndex:0]];
- awayTeamArray = [awayTeamArray arrayByAddingObject:[gameAttributeArray objectAtIndex:1]];
+ awayTeamArray = [awayTeamArray arrayByAddingObject:[gameAttributeArray objectAtIndex:0]];
+ homeTeamArray = [homeTeamArray arrayByAddingObject:[gameAttributeArray objectAtIndex:1]];
gameTimeArray = [gameTimeArray arrayByAddingObject:[gameAttributeArray objectAtIndex:2]];
i++;
Please sign in to comment.
Something went wrong with that request. Please try again.