iphone - Cannot perform a segue from my class -
I am working with the library KYCircleMenu You can finish it I am also working with the storyboard. I have been taken from a class MenuViewController KYCircleMenu that
@interface MenuViewController:. KYCircleMenu Next I have implemented my initWithCoder like this
- (id) initWithCoder: (NSCoder *) aDecoder {NSLog (@ "called" ); If (self = [self initWithButtonCount: kKYCCircleMenuButtonsCount menuSize: kKYCircleMenuSize buttonSize: kKYCircleMenuButtonSize buttonImageNameFormat: kKYICircleMenuButtonImageNameFormat centerButtonSize: kKYCircleMenuCenterButtonSize centerButtonImageName: kKYICircleMenuCenterButton centerButtonBackgroundImageName: kKYICircleMenuCenterButtonBackground]) {} return self; } And finally I have applied a method from the kickstart menu runbutton action . This method tells me what button is pressed in the menu. So in this method I am trying to do a SEG for another view controller. I am doing this like this. NSLog (@ "Tag is% d", [sender tag]); [Self display CJU with identifier: @ "ShowNews" sender: self]; (The log gives the button tag with the button pressing me).
Receiver (& lt; MenuViewController: 0x1cd7cf50 & gt;) for any reason or else I am getting this error. There is a segue with the identifier 'showNews' Here is a screenshot from my storyboard.
Anyone annoying problem Can help me with that?
Like
- (id) initWithCoder: (NSCoder * ) ADecoder {NSLog (@ "called"); If (self = [self initWithButtonCount: kKYCCircleMenuButtonsCount menuSize: kKYCircleMenuSize buttonSize: kKYCircleMenuButtonSize buttonImageNameFormat: kKYICircleMenuButtonImageNameFormat centerButtonSize: kKYCircleMenuCenterButtonSize centerButtonImageName: kKYICircleMenuCenterButton centerButtonBackgroundImageName: kKYICircleMenuCenterButtonBackground]) {} return self; } Here, you are doing nothing with the aDecoder object - it contains information from the storyboard (including segue). Instead, you're creating a new object, ignoring any of the things set in the storyboard. I have seen instantly in a repository and it does not appear to be in use in the storyboard - it implements its load load method, has a named initial and so on with it To play around after calling those properties must be set [super initWithCoder: aDecoder]; , perhaps by pulling out the setup code from the designated initialiser and placing it in a different method.
Comments
Post a Comment