ios - moving between xib/nib files in swipe navigation -


i need move between xib/nib files using uibuttons can't connect buttons, there way in if i'm connecting 2 xib/nib files?

you cannot use segues in nib/xibs. transition 1 nib-based view controller another, have hook button @ibaction programmatically transitions next view controller. open nib, choose assistant editor, , control-drag button down the code , create @iboutlet performs @ibaction:

button

and in @ibaction, write code programmatically transition other nib (in case, i'm calling routine pushes next view controller using navigation controller).


for swipe gestures, idea largely same. first, drag swipe gesture object library onto view:

swipe

then control-drag swipe gesture code in assistant editor, specify it's "action", , write code transition next scene:

enter image description here


note, if want make swipe gestures interactive (i.e. transition coordinated user's gesture, allowing them pause, complete, or cancel gesture), it's more complicated, can done. i'd suggest master simple uiswipegesturerecognizer first. if , when there, see discussion of interactive custom transitions navigation controller gestures or interactive custom presentation transitions.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -