开发者

programmatically ActionSheet's Buttons

I need some guidance for following :

  • I have an ActionSheet. When it appears it shows my custom view with two buttons.
  • The View is called from another (.h/.m)file using xib.
  • How can I set cancel event on one of the button. Buttons are added into view not in ActionSheet.
  • OR How can I put buttons on ActionSheet programmatically ?

Than开发者_如何学编程ks...


Here is the link to your answer.

Also you can refere the Class Reference for UIActionsheet to get all the solutions related to action sheet.


You can make your own action sheet. For this you have to make a view controller and you can use it as action sheet by using

[self presentModalViewController:YourViewController animated:YES];

And on cancel btn action you can do

[self dismissModalViewControllerAnimated:YES];

Hope it will work for you.


You have to remove that view from superview when user tap on cancel button.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜