0
默認情況下,適用於iPhone的橫向模式下的UIActionSheet
採用屏幕寬度(480)。更改UIActionSheet寬度
我試圖儘量減少寬度。我們如何改變寬度並且蘋果是否會接受這種行爲?
全碼:
actionSheet = [[UIActionSheet alloc] initWithTitle:@"\n\n\n\n\n\n\n\n\n\n\n" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil,nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; actionSheet.delegate = self; [actionSheet showInView:self.view]; [actionSheet setBounds:CGRectMake(0 , 0, 200, 320)];
我嘗試設置UIAction表單的邊界。 [actionSheet setBounds:CGRectMake(0,0,200,320)]; – Bharathi
actionSheet = [[UIActionSheet的alloc] initWithTitle:@ 「\ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n」 個 委託:自 cancelButtonTitle:無 destructiveButtonTitle:無 otherButtonTitles:零,零]。 actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; actionSheet.delegate = self; [actionSheet showInView:self.view]; [actionSheet setBounds:CGRectMake(0,0,200,320)]; – Bharathi
您必須閱讀[this](http://stackoverflow.com/a/1860168/932011)您可以使用[UIView](https://github.com/homeyer/CustomUIActionSheet)使用uiactionsheet。您可以創建一個像動作表一樣滑動的自定義視圖 – akk