ios - Need assistance regarding UIActionSheet -
i trying add uisegmentcontroller uiactionsheet here code
uiactionsheet *actionsheet = [[uiactionsheet alloc]initwithtitle:nil delegate:self cancelbuttontitle:@"cancel" destructivebuttontitle:nil otherbuttontitles:@"copy", @"new key", nil]; nsarray *keylengthoptions = [nsarray arraywithobjects:@"option 1", @"option 2", nil]; uisegmentedcontrol *segmentcontroller = [[uisegmentedcontrol alloc]initwithitems:keylengthoptions]; segmentcontroller.frame = cgrectmake(35, 0, 250, 38); [segmentcontroller addtarget:self action:@selector(segmentvaluechanged:) forcontrolevents:uicontroleventvaluechanged]; [segmentcontroller setsegmentedcontrolstyle:uisegmentedcontrolstylebar]; [actionsheet addsubview:segmentcontroller]; [actionsheet setframe:cgrectmake(0, 0, 320, 500)]; [actionsheet showinview:self.navigationcontroller.tabbarcontroller.view];
every thing working fine [actionsheet setframe:cgrectmake(0, 0, 320, 500)];
not working. how increase size of uiactionsheet adjust subview?
the order important. need call showinview: on uiactionsheet first, adjust size. here question addresses this:
Comments
Post a Comment