Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Short date/time style in pulldown box
Browse files Browse the repository at this point in the history
When pulling down table view to refresh display, show short-format
date/time.
  • Loading branch information
escherba committed Dec 1, 2012
1 parent 4dee750 commit 6085dcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions PullToRefresh/PullToRefreshView.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ - (void)refreshLastUpdatedDate {

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setLocale:[NSLocale currentLocale]];
[formatter setDateStyle:NSDateFormatterMediumStyle];
[formatter setTimeStyle:NSDateFormatterMediumStyle];
lastUpdatedLabel.text = [NSString stringWithFormat:@"Last Update: %@", [formatter stringFromDate:date]];
[formatter setDateStyle:NSDateFormatterShortStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
lastUpdatedLabel.text = [NSString stringWithFormat:@"Last Updated: %@", [formatter stringFromDate:date]];
[formatter release];
}

Expand All @@ -151,14 +151,14 @@ - (void)setState:(PullToRefreshViewState)state_ {

switch (state) {
case PullToRefreshViewStateReady:
statusLabel.text = @"Release to refresh...";
statusLabel.text = @"Release to update...";
[self showActivity:NO animated:NO];
[self setImageFlipped:YES];
scrollView.contentInset = UIEdgeInsetsZero;
break;

case PullToRefreshViewStateNormal:
statusLabel.text = @"Pull down to refresh...";
statusLabel.text = @"Pull down to update...";
[self showActivity:NO animated:NO];
[self setImageFlipped:NO];
[self refreshLastUpdatedDate];
Expand Down
1 change: 0 additions & 1 deletion RSLocalPageController/RSLocalPageController.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ -(void) getForecast
// will stop animation in weatherForecastDidFinish
}


#pragma mark - Key-Value-Observing
// override setter so that we register observing method whenever locality is added
-(void)setLocality:(RSLocality *)localityValue
Expand Down

0 comments on commit 6085dcd

Please sign in to comment.