Reputation: 2403
As I observed that UIActionSheet is always appearing from down side in iPhone, but in some app, as I saw in AlarmClock, then two button became visible, one from upside and second from downside of iPhone, What is that exactly, I can't understand, as far as I feel, it looks UIActionSheet, I want such appearance for one of my app.... Help!
Upvotes: 2
Views: 1305
Reputation: 9324
Yes just like Ole said, you can't customize UIActionSheet
. But since it is just a simple subview you can create your personal "action sheet" by subviewing and animating. So if you want a button to appear on the top and one on the button, then create two UIViews resize them to the right size for your button, add your action sheet style background or any other background, add your button, connect your IBActions to the buttons and your IBOutlets to the views. Then when you want the buttons to appear animate them onto the screen (using sone CGRect
, animation time and finally [UIView commitAnimations]
)
Upvotes: 1
Reputation: 135588
Probably just one or two custom views with a custom animation. UIActionSheet
is not customizable so if you want something else than the default behavior you have to write it yourself. It's not that difficult.
Upvotes: 1