Reputation: 8484
I am creating a tableView
on my iPad app where one of the cells
has a UIButton
titled "Edit notes". I would like a view to pop up over the screen containing a "textfield" and the keyboard, not a new view/push. Prefferably not even covering the whole screen. I guess I am looking for the view used when you have your iPad in landscape mode and you compose a new e-mail. A view popping up from beneath while you can still see the main view in the background.
I've been looking around, but I have no clue what to search for!
Here's an image of something like what I'm talking about, only I would need it to say "Save" instead of "Send" and without the "to/Cc/subject"-fields, and I guess I would require an NSString as return value. Any clues?
Or something similar!
Upvotes: 0
Views: 51
Reputation: 5766
This is called modal presentation style.
You can present any UIViewController
or its subclasses.
Set the modalPresentationStyle
property to UIModalPresentationFormSheet
and present this viewController from an parent viewController (your tableViewController perhaps) with the presentViewController:animated:completition:
method.
Take a look at the docs.
Upvotes: 2
Reputation: 3991
In Interface Builder, search for an object called "Container View". You can include whatever you want in this container and show/hide it when you need.
Upvotes: 0