2010-07-27 75 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; 
    } 
}