Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed timezone controller back button

  • Loading branch information...
commit 954896ed72f8978604eea7a8ca5ce258a01f48d9 1 parent 2d33113
@jsmilani jsmilani authored
Showing with 15 additions and 16 deletions.
  1. +15 −16 TimezoneTableViewController.m
View
31 TimezoneTableViewController.m
@@ -17,28 +17,27 @@ @interface TimezoneTableViewController () <UISearchDisplayDelegate>
@implementation TimezoneTableViewController
-- (id)initWithStyle:(UITableViewStyle)style {
- self = [super initWithStyle:style];
- if (self) {
-// self.navigationItem.hidesBackButton = NO;
-// self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
- }
- return self;
-}
-//
-//- (void)cancel {
-// [self.navigationController popViewControllerAnimated:YES];
+//- (id)initWithStyle:(UITableViewStyle)style {
+// self = [super initWithStyle:style];
+// if (self) {
+//// self.navigationItem.hidesBackButton = NO;
+//// self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(cancel:)];
+// }
+// return self;
//}
+- (IBAction)cancel:(id)sender {
+ [self.navigationController popViewControllerAnimated:YES];
+}
+
- (void)viewDidLoad
{
[super viewDidLoad];
-// self.timezoneList = [NSArray array];//[NSTimeZone knownTimeZoneNames];
-
- UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel"
- style:UIBarButtonSystemItemDone target:self action:nil];
- self.navigationItem.leftBarButtonItem = leftButton;
+ UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:@selector(cancel:)];
+ self.navigationItem.leftBarButtonItem = button;
+
+ self.navigationItem.title = @"Timezone";
self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 44.0f)];
self.tableView.delegate = self;
Please sign in to comment.
Something went wrong with that request. Please try again.