ios - unable to get selected segmentedcontrol to highlight on button click -



ios - unable to get selected segmentedcontrol to highlight on button click -

the next method changes segmented command view button click can't seem create selected segmented command item highlighted. need show segmented command index 1 selected.

- (ibaction)buttonclicked:(id)sender{ [self addchildviewcontroller:searchpageview]; [self.viewcontainer addsubview:searchpageview.view]; [self.segmentedcontrol setselectedsegmentindex:1];

}

the code posted should work. seek adding breakpoint buttonclicked method ensure beingness called when button pressed. in debugger create sure self.segmentedcontrol not nil.

ios objective-c ios7 uisegmentedcontrol

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -