1

New to xcode so I am not quite understanding views and view controllers.

I want a simple 3-4 page app with swipe up navigation, similar to this question:

How to mimic iOS 10 maps bottom sheet

How would I implement this on every page instead of hard coding into each one?

If I decided to add more pages that would become tedious and inefficient.

I have used Ionic 2 and you simply make an outlet for all your views to go into, with your navigation surrounding it.

I saw containers in xcode, but that seems to be more difficult then a push/pop navigation.enter image description here

What is the best way to implement this in the storyboard?

Yes, I have no code, but the story board does not need code

Community
  • 1
  • 1
theblindprophet
  • 7,767
  • 5
  • 37
  • 55

1 Answers1

0

How would I implement this on every page instead of hard coding into each one?

If you know how to do it, you should never need to copy it to each page. You could make a base class or (even better) a protocol with extension that implements it.

You could also make a swipe-up view that puts gestures into its parent view when it's added.

If you do that, you could add the storyboard directly (add a UIView, change its class to yours)

Lou Franco
  • 87,846
  • 14
  • 132
  • 192