i can perform operation set navigation button icon on views commonly. example if put code in app delegate method it's used controllers.
here final answer have used in current app hope useful..
in view didload method..
uibutton *leftbutton = [uibutton buttonwithtype:uibuttontypecustom]; leftbutton.frame = cgrectmake(0, 0, 40, 40); [leftbutton setimage:[uiimage imagenamed:@"back"] forstate:uicontrolstatenormal]; [leftbutton addtarget:self action:@selector(left_menu_click:) forcontrolevents:uicontroleventtouchupinside]; uibarbuttonitem *leftbarbuttonitem = [[uibarbuttonitem alloc] initwithcustomview:leftbutton]; self.navigationitem.leftbarbuttonitem = leftbarbuttonitem;
add method navigate popviewcontroller..
-(ibaction)left_menu_click:(id)sender{ [self.navigationcontroller popviewcontrolleranimated:yes]; }
Comments
Post a Comment