Skip to content

Commit

Permalink
Sometimes users affected is NSNull
Browse files Browse the repository at this point in the history
  • Loading branch information
julienp committed Mar 24, 2013
1 parent b6622da commit 9636dea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iCloudStatus/JPDetailViewController.m
Expand Up @@ -37,7 +37,11 @@ - (void)viewWillAppear:(BOOL)animated
[super viewWillAppear:animated];
self.titleLabel.text = self.event.title;
self.messageLabel.text = self.event.message;
self.usersLabel.text = self.event.usersAffected;
if (![[NSNull null] isEqual:self.event.usersAffected]) {
self.usersLabel.text = self.event.usersAffected;
} else {
self.usersLabel.text = @"";
}

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.timeStyle = NSDateFormatterShortStyle;
Expand Down

0 comments on commit 9636dea

Please sign in to comment.