转自:http://hongmin118.iteye.com/blog/1333524

error: Semantic Issue: Interface type cannot be statically allocated

出现这个错误的原因是

 

接口声明对象时(我这么一说,大家应该懂我意思吧),必须声明为引用,即指针

 

Car car = [[Car alloc] init];

改为 Car *car = [[Car alloc] init];

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-08-23
  • 2021-09-09
猜你喜欢
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2021-09-16
  • 2021-10-30
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案