xcode - How to connect a button to a new view controller iOS Swift? -


i'm pretty new swift , trying connect button view controller. on other apps have made swift have been able control-drag button view controller, display "show" option click. when run , click button show desired view controller.

on app working on, trying add settings page accessed clicking button. when tried control-click , drag button second view control, displayed 3 options: push, modal, , custom. selected push, , when ran app , pressed button showed sinabrt error. how can connect button second view controller pressing it?

you see "show" option if working on project targeting ios 8 , later, since new feature determine proper way show new view controller. opt "push" if in navigation controller , "modal" if in regular controller context.

here might working project deploy target ios 7 or below. can choose use "modal" here present view controller bottom of screen , implement exit button. or can embed current view controller navigation controller use "push" make new view controller pushed right hand left, button navigating automatically.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -