2012-03-21 38 views
2

這是我的實現,我基本上創建動作表和選取器視圖。問題是顯示你選擇的項目沒有顯示的指標。選擇指示器不顯示在操作表內的選取器視圖中

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil]; 
actionSheet.actionSheetStyle = UIActionSheetStyleDefault; 

UIPickerView* picker = [[UIPickerView alloc] initWithFrame:CGRectMake(0,100, 320, 216)]; 
picker.dataSource = self; 
picker.delegate = self; 

[actionSheet addSubview:picker]; 


[actionSheet showInView:self.view]; 

[actionSheet setBounds:CGRectMake(0,0, 320, 411)]; 

回答

10

它看起來像你錯過了這條線:

[picker setShowsSelectionIndicator:YES]; 
+0

這是它,我知道這是一些簡單的我失蹤。 – Jhorra 2012-03-21 16:41:17

相關問題