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
Post a Comment