Tuesday, 15 June 2010

uiview - Embedded SegmentControl fails to respond to touch -



uiview - Embedded SegmentControl fails to respond to touch -

i have solved issue segmentcontrol wasn't scrolling table view. did embedding command in table view, so:

uiview *headerview = [[uiview alloc] init ]; [headerview addsubview:resultssegment]; self.tableview.tableheaderview = headerview;

this works nicely......

but can't click on segment control. it's embedded mean it's behind tableview far users touch concerned?

any ideas on how create segmentcontrol "clickable" again?

thanks

the segment command not behind tableview. on tableview.

to create segmentcontrol clickable again, need set segmentcontrol properties. here illustration code web.

nsarray *itemarray = [nsarray arraywithobjects: @"one", @"two", @"three", nil]; uisegmentedcontrol *segmentedcontrol = [[uisegmentedcontrol alloc] initwithitems:itemarray]; segmentedcontrol.frame = cgrectmake(35, 200, 250, 50); segmentedcontrol.segmentedcontrolstyle = uisegmentedcontrolstyleplain; segmentedcontrol.selectedsegmentindex = 1; [segmentedcontrol addtarget:self action:@selector(pickone:) forcontrolevents:uicontroleventvaluechanged]; [self.view addsubview:segmentedcontrol];

uiview ios6 tableview uisegmentedcontrol

No comments:

Post a Comment