VonKoob
VonKoob

Reputation: 77

UIActionsheet Ipad/Iphone

I'm currently using a UIActionsheet for my universal app, works great and all, but I want the iPad actionsheet to resemble the iPhone actionsheet.

Is there anything on the iPad that is similar to the iPhone actionsheet? Alternatively, is there a way to reposition the iPad actionsheet and popoverview WITHOUT a direction arrow?

Thanks

EDIT: Here is the code where I implement and add the actionsheet

adActionSheet = [[UIActionSheet alloc]initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Go to Site", @"Some other button", nil];
    [adActionSheet showFromRect:CGRectMake(300, 1150, 200, 200) inView:self.view animated:YES];

Upvotes: 2

Views: 1417

Answers (2)

rmaddy
rmaddy

Reputation: 318794

On an iPad, action sheets are automatically shown in a popover. This can't be changed. You can't remove the array either. The UIActionSheet API doesn't support what you want.

Your only solution is a custom implementation that does what you want.

Upvotes: 2

Mohammad Rabi
Mohammad Rabi

Reputation: 1412

Actually you can remove arrow from UIPopover in ipad

[self.popoverController presentPopoverFromBarButtonItem:anItem   
                                permittedArrowDirections:0
                                                animated:YES];

or

[self.popoverViewController presentPopoverFromRect:rect
 inView:self.view  permittedArrowDirections:0 animated:YES];

The zero represent no direction.

Upvotes: 0

Related Questions