iphone - trying to programmatically create rightBarButtonItem -
this doesn't seem working. doing wrong?
-(void)awakefromnib{     uibarbuttonitem *rightbarbuttonitem = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target:self action:@selector(showneweventviewcontroller)];     self.navigationitem.rightbarbuttonitem = rightbarbuttonitem;     nslog(@"awaked");     [rightbarbuttonitem release]; }      
i put code in viewdidload method rather awakefromnib method; i'm not sure if that's problem lies. "not working" mean?
Comments
Post a Comment