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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -