Question

I have five UIButtons displayed in UIActionsheet. This is displayed fine in portrait-mode. However, in case of landscape-mode all UIButtons are grouped together and presented by iOS (6.1.3) as shown in screenshot.

enter image description here

Also, the console displays following message :

Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].

I would like to know the reason and possible solution to avoid it.

Was it helpful?

Solution

This is not a Landscape/Portrait issue. This will happen in portrait mode as well, if you add enough buttons.

That is a UIActionSheet that has too many buttons to fit on the UI.

When there are too many buttons, UIActionSheet uses a stylised table view to display the choices. You can't make the sheet display in this way by choice - it only displays if there are too many buttons to show at one time (which is why it is often seen in landscape mode).

Source: this answer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top