- (void)viewDidLoad
{
UINavigationBar *naviBarObj = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0.1, 320, 44)];
naviBarObj.tintColor=[UIColor redColor];
[self.view addSubview:naviBarObj];
UIBarButtonItem *search = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStyleBordered target:self action:@selector(searchAction)];
UIBarButtonItem *doneItem = [[UIBarButtonItem alloc] initWithTitle:@"Filter" style:UIBarButtonItemStyleBordered target:self action:@selector(doneButtonPressed)];
UINavigationItem *navigItem = [[UINavigationItem alloc] initWithTitle:@"Around Me"];
navigItem.rightBarButtonItem = doneItem;
navigItem.leftBarButtonItem = search;
naviBarObj.items = [NSArray arrayWithObjects: navigItem,nil];
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
No comments:
Post a Comment