Cannot declare variable inside @interface or @protocol

前端 未结 4 1629
时光说笑
时光说笑 2021-01-31 18:19

I have an iOS app built since the beginning with an error in it. Since the source was began constructed from the template, its appdelegate.h looks like:

@interfa         


        
4条回答
  •  抹茶落季
    2021-01-31 19:00

    The compiler is complaining about the variables being in the @interface block, so move them out of it, either above the @interface or below @end. You'll actually probably want to change them to externs in the header and actually declare them in the .m file.

提交回复
热议问题