Bharathi
Bharathi

Reputation: 485

Changing UIActionSheet width

By default, UIActionSheet in Landscape mode for iPhone takes the width of screen (480).

I tried to minimize the width. How can we change the Width and Will Apple accepts this behaviour?

Full code:

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)];

Upvotes: 0

Views: 965

Answers (1)

user470763
user470763

Reputation:

I don't think this ability is built into UIActionSheet as I am sure I haven't seen it implemented in any app. I would create a custom UIView and use a UIViewAnimation to slide it up from the bottom of the screen. If you wanted it to prevent access to the view behind your custom action sheet you would need to create a view to go between your main view and custom action sheet which covers the full size of the screen.

Upvotes: 1

Related Questions