ios - moving between xib/nib files in swipe navigation -
i need move between xib/nib files using uibutton
s 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
:
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:
then control-drag swipe gesture code in assistant editor, specify it's "action", , write code transition next scene:
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
Post a Comment