Saturday, May 10, 2014

Programatically add Right Bar button Item In NavigationBar in iOS

UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
    [infoButton addTarget:self action:@selector(showInfoView:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
-(void) showInfoView{  }

No comments:

Post a Comment