Posted By

saturngod on 10/12/10


Tagged

iPhoneSDK


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bobbym245


Infobutton at Navigationbar


 / Published in: Objective C
 

URL: http://www.iphonedevsdk.com/forum/iphone-sdk-development/18878-how-place-uibarbuttonitem-uinavigationitem.html

  1. UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
  2. [infoButton addTarget:self action:@selector(toggleInfo) forControlEvents:UIControlEventTouchUpInside];
  3. UIBarButtonItem *iButton = [[UIBarButtonItem alloc] initWithCustomView: infoButton];
  4. self.navigationItem.rightBarButtonItem = iButton;
  5. [iButton release];

Report this snippet  

You need to login to post a comment.