2012-05-12 1 views
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)]; 
+0

UIAction 시트의 범위를 설정하려고했습니다. [actionSheet setBounds : CGRectMake (0, 0, 200, 320)]; – Bharathi

+0

actionSheet = [UIActionSheet ALLOC] initWithTitle @ "\ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n" 대리인 : 자기 cancelButtonTitle : destructiveButtonTitle 닐 : otherButtonTitles 닐 : nil, nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; actionSheet.delegate = self; [actionSheet showInView : self.view]; [actionSheet setBounds : CGRectMake (0, 0, 200, 320)]; – Bharathi

+1

사용자는 [this] (http://stackoverflow.com/a/1860168/932011)을 읽어야합니다. [UIView] (https://github.com/homeyer/CustomUIActionSheet)를 사용하여 사용자 인터페이스 시트를 사용할 수 있습니다. 액션 시트처럼 위로 움직이는 커스텀 뷰를 생성 할 수 있습니다. – akk

답변

1

나는 내가 어떤 응용 프로그램에서 구현 보지 확신으로이 기능은 UIActionSheet에 내장되어 생각하지 않습니다. 사용자 지정 UIView를 만들고 UIViewAnimation을 사용하여 화면 맨 아래에서 위로 슬라이드합니다. 사용자 지정 작업 시트 뒤에있는보기에 액세스하지 못하게하려면 기본보기와 전체 화면 크기를 다루는 사용자 지정 작업 시트 사이를 이동하는보기를 만들어야합니다.