IOS之提示Interface type cannot be statically allocated

258 阅读1分钟

1、问题

command  + R运行提示如下错误

Interface type cannot be statically allocated

 

 

 

2、解决办法

是代码写错了

User user = [[User alloc] init];

改成如下

 

User *user = [[User alloc] init];