1

我开发了一个应用程序,其部署目标ios sdk 为 6.0。后来我的客户要求应用程序应该在 ios 5.0+ 设备中运行。所以我已将部署目标更改为 5.0 并禁用了 IB 的自动布局属性,如堆栈中所述,但现在我收到如下所示的错误:

> -[UIBarButtonItem setBackgroundImage:forState:style:barMetrics:]: 无法识别的选择器发送到实例 0x2971f0

我没有发现我的 UIBarButtonItem 有什么问题,

 addButton = [[UIBarButtonItem alloc]
        initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
        target:self
        action:@selector(addProject)];

现在我正在努力寻找解决方案,等待您的宝贵帮助..提前致谢。

4

1 回答 1

2

setBackgroundImage:forState:barMetrics:在 iOS 5.0+ 中可用,但setBackgroundImage:forState:style:barMetrics:仅在 iOS 6.0+ 中可用

于 2013-03-16T09:47:49.617 回答