I learned how to create a view controller and make the view slide in from bottom. But the one in iphone album looks different. It darkens the rest of the visible portion of the screen when the view slides in. How do I create a similar one? I want to add buttons like “save, cancel, email” etc into the sliding view.
Share
This actually isn’t a typical “sliding” (or modal) view, but a UIActionSheet. Basically, the idea is that you initialize the view (usually in your view controller) with
Then present it using
Once it’s onscreen, the delegate (
self, or your view controller, in this example) will receive the UIActionSheetDelegate messageactionSheet:clickedButtonAtIndex:(as well as some others; see the documentation for more), so you’ll want to add<UIActionSheetDelegate>to your interface declaration for the delegate and implement that method, like