fix navbar style; bookmark button status

This commit is contained in:
clowwindy
2013-01-02 14:03:27 +08:00
parent 802663766a
commit 2342e9ff54
2 changed files with 8 additions and 2 deletions

View File

@@ -204,7 +204,7 @@ static const Boolean kBackwardButton = NO;
_backButton.enabled = NO;
_stopRefreshButton.enabled = NO;
_toolButton.enabled = YES;
_bookmarkButton.enabled = NO;
_bookmarkButton.enabled = YES;
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject:_backButton];
@@ -490,7 +490,7 @@ static const Boolean kBackwardButton = NO;
-(void) showSettings {
ProxySettingsTableViewController *settingsController = [[ProxySettingsTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:settingsController];
nav.navigationBar.tintColor = [UIColor blackColor];
// nav.navigationBar.tintColor = [UIColor blackColor];
nav.navigationBar.barStyle = UIBarStyleBlackOpaque;
[self presentModalViewController:nav animated:YES];
}

View File

@@ -75,6 +75,8 @@
UIBarButtonItem *done = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done)];
self.navigationItem.rightBarButtonItem = done;
UIBarButtonItem *cancel = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel)];
self.navigationItem.leftBarButtonItem = cancel;
self.navigationItem.title = NSLocalizedString(@"Proxy Settings", nil);;
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
@@ -85,6 +87,10 @@
#pragma mark - navigation
-(void)cancel {
[self dismissModalViewControllerAnimated:YES];
}
-(void)done {
if (ipField.text == nil) {
ipField.text = @"";