“Expected a type” error pointing to the return type of a method

前端 未结 8 1522
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 06:02

I\'ve attempted to compile, but every time I do, one method throws a strange \"expected a type\" error. I have a method in the header:

-(ANObject *)generateS         


        
相关标签:
8条回答
  • 2020-12-13 06:54

    Usually when I see an error like this it's because I have a typo on a previous line, such as an extra or missing parenthesis or something.

    0 讨论(0)
  • 2020-12-13 06:56

    I got this message, when the variable type was misspelled. See below this below

    e.g.

    -(void)takeSimulatorSafePhotoWithPopoverFrame:(GCRect)popoverFrame {
    

    instead of.....

    -(void)takeSimulatorSafePhotoWithPopoverFrame:(CGRect)popoverFrame {
    
    0 讨论(0)
提交回复
热议问题