2010-07-27 76 views

回答

0

你将不得不滚动你自己的一个。我在这种情况下做的是将选取器视图移出屏幕,然后当它们按下按钮时,它将选取器视图移动到屏幕上。然后它们在选中时熄灭。

3

你可以尝试使用UIActionSheet这样的:

UIActionSheet *action = [[UIActionSheet alloc] initWithTitle:@"A title here"              delegate:self 
cancelButtonTitle:@"Cancel"            destructiveButtonTitle:@"Dismiss" 
otherButtonTitles:@"One option", @"Another option", nil]; 

[action showInView:self.view]; 

然后实现委托方法像这样的:

// Called when a button is clicked. The view will be automatically dismissed after this call returns 
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { 
    switch (buttonIndex) { 
     case x: 
      //Chose option x 
      break; 
        ... 
     default: 
      //Default action 
      break; 
    } 
}