自定义tabbar时,声明代理时报警告
![](https://img.haomeiwen.com/i1362791/1cea22d466421ea8.png)
![](https://img.haomeiwen.com/i1362791/387d713ce2c4e39c.png)
原因是自定义的tabbar,没有继承系统的UITabBarDelegate
解决:
1,将自定义代理继承系统的代理
![](https://img.haomeiwen.com/i1362791/90e2d52223abe2f3.png)
2,xcode会认为自定义的delegate与系统UITabBar的delegate重名,在.m中加@dynamic delegate;警告消除
![](https://img.haomeiwen.com/i1362791/8f78ad751d9b1870.png)
自定义tabbar时,声明代理时报警告
原因是自定义的tabbar,没有继承系统的UITabBarDelegate
解决:
1,将自定义代理继承系统的代理
2,xcode会认为自定义的delegate与系统UITabBar的delegate重名,在.m中加@dynamic delegate;警告消除
本文标题:Property type 'id
本文链接:https://www.haomeiwen.com/subject/ytlunctx.html
网友评论