objective c - Buttons are not working -
objective c - Buttons are not working -
hello next this tutorial little bit of enhancements of own. unfortunately stuck @ 1 point can't find out do.. (i doing of training/learning purposes im pretty new ios development).
at step have add segue navigate back did whatever tutorial said won't bring me original view 1 time @ viewcontroller , press cancel or done.
i did add together new header file called grocerylisttableviewcontroller.h containing
@interface grocerylisttableviewcontroller (workaround) -(ibaction)unwindtolist: (uistoryboardsegue *)segue; @end
and have changed classname of grocerylisttableviewcontroller.swift
@objc(grocerylisttableviewcontroller)class grocerylisttableviewcontroller: uitableviewcontroller
then lastly step pointed both buttons exit element above viewcontroller.
somehow works except 2 buttons. doing wrong here?
the woraround separate .h file beta versions of xcode , no longer necessary. can delete .h file.
in class file segue should go to, set code want perform, such as:
@ibaction func cancel(segue: uistoryboardsegue!) { // code here } @ibaction func done(segue: uistoryboardsegue!) { // code here }
then, in storyboard ctrl-drag navigation button exit icon:
when release mouse button, 2 functions appear. take appropriate action button:
that's it. hope helps.
objective-c swift xcode6
Comments
Post a Comment