美文网首页
Property type 'id _

Property type 'id _

作者: 夏天爱西瓜汁 | 来源:发表于2019-12-18 14:50 被阅读0次

    自定义tabbar时,声明代理时报警告


    图片.png
    图片.png

    原因是自定义的tabbar,没有继承系统的UITabBarDelegate

    解决:
    1,将自定义代理继承系统的代理


    图片.png

    2,xcode会认为自定义的delegate与系统UITabBar的delegate重名,在.m中加@dynamic delegate;警告消除


    图片.png

    相关文章

      网友评论

          本文标题:Property type 'id _

          本文链接:https://www.haomeiwen.com/subject/ytlunctx.html