I can't figure how to fix this Expected identifier or '('

后端 未结 2 721
花落未央
花落未央 2021-01-29 11:43
- (IBAction)SignUp:(id)sender;  {                                   Expected identifier or \'(\'

    IBOutlet UITextField *Firstnamefield;
    IBOutlet UITextField *Las         


        
2条回答
  •  别那么骄傲
    2021-01-29 12:34

    It seems to me that you put an IBAction at the wrong place in the .h file. It should be after the definition of the instance variables, for example:

    @interface ViewController : UIViewController
    {
        IBOutlet UITextField *Firstnamefield;
        IBOutlet UITextField *Lastnamefield; 
        // ...
    }
    - (IBAction)SignUp:(id)sender;
    
    @end
    

提交回复
热议问题