iOS: Slide in view created in storyboard - ios

I don't know how to do this. I have a view created in Storyboard containing a picker wheel and slightly below a button.
Now if the user clicks a button in my view controller I want this "view container" slided in from the top and as soon as this button (within this view container) is clicked, the view should slide out to the top again. But how can I do this? As said I created this view container completely in my storyboard over my main view controller but don't know how to program this and also not what to do with the vertical constraints?

You want this view to be managed by a view controller. When the button is tapped, you call the view controller with a down animation. When the button under the picker wheel is tapped, you dismiss the view controller with a top animation.

Related

IOS: Add UIButton to the bottom of a Static Table View inside Container view and Navigation Controller

I have this problem:
I want to add a button to the bottom of a static table view controller. This all inside a Navigation Controller. I know that static table view can be used inside Navigation Controller only with a TableViewController. Ok no problem, I create a ViewController with a Container view connected to TableViewController. That's it. But now when i add the button outside container view, the button is shown in every controller. Is there a way to show only in the first view controller, without removing programmatically?
Solved.
I had to put in storyboard another VIEW before pushing the Button. And in next tableViewController no button is shown.

Swipe view controller with gesture

I want to create an interaction between two view controller.
The first view controller has a button with the action to show the second view controller from the bottom to half of his height.
From there i can dismiss the second view controller, from first view controller underneath it, by using the swipe gestures slide up (full screen) and slide down (dismiss).
For example: the same interaction in Google Maps app when long pressed a point on the map. First the second view controller is shown over the map view controller than with swipe gesture you can dismiss or changed in full screen the second view controller's appearance.

Place button outside Modal View Controller

I would like to add a close button outside the bounds of the modal view controller which I am presenting on an iPad app.
I tried adding a button normally via storyboard, via coding, but the UIButtons view gets clipped by the bounds of the modal view controller.
What my purpose is : I want to add a close button at the right corner of my modal view controller which is configured as a Form sheet.
I'm launching the modal view controller via a segue from my previous view.
Attached screenshot show what I am trying to achieve:

displaying UIPickerView over current ViewController xcode

Here is my current problem. I have a UIViewController setup with its data and everything on a small sized view controller. What I am trying to see is if it is possible to connect that to a separate view controller. For example I have a view controller that has a user click a button. Upon pressing the button the UIPicker ViewController would pop up from the bottom and I could go from there. I know how to enable this if the picker is on the same view controller. However, I have no idea how to if its on its own ViewController. Any ideas?
One way to do this would be to put the picker view on the same view controller and make it hidden, and, when they press the button, unhide it or load the other view controller when they press the button; this will display the other view controller, not what's on the current one.

UIViewController as a subview for other view controllers

My app has a menu button which is available in every view controller. Every time a user taps on the menu button, a small menu pops up. The menu has multiple UIButtons, and each button links to another view controller.
My current solution is to create a view controller with a nib for the menu view and add it as a subview to each of the other main view controllers.
Is there is a better solution?
There could be multiple ways of doing it and I don't think there is the best answer.
However, in the performance perspective, implementing a view container such as UINavigationController or UITabBarController would be most effective.
Implement a root view controller (whose view is added as the only direct subview of the application window), and add the menu as a subview of its view. Let the root view controller decide (or know) which view to display, and add the view as a subview of its view, below the menu.
In this way, the view for the menu need not be removed and added again to the current view hierarchy.

Resources