Unrecognized selector sent to instance

后端 未结 3 1949
遥遥无期
遥遥无期 2020-12-21 09:36

Anyone know why I am getting this error?

Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason: \'-[CustomRaisedTabViewController          


        
3条回答
  •  不思量自难忘°
    2020-12-21 10:21

    you have to modify the cancel method signature in

    -(IBAction)cancel:(id)sender
     { 
       [self.parentViewController dismissModalViewControllerAnimated:YES]; 
     }
    

    when you added the action to your cancelButton (during initialization) you specified the "cancel:" selector, this means that it will be called a method having one parameter (the sender button)

提交回复
热议问题