简体   繁体   中英

iOS: Slide in view created in storyboard

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM