ESTabBarController
ESTabBarController copied to clipboard
cocoapod安装后与oc混编,ESTabBarItem的contentView无法访问
trafficstars
cocoapod安装后,与oc混编,使用如下代码
ESTabBarItem *es=[[ESTabBarItem alloc]init:[[ExampleBouncesContentView alloc]init] title:@"test" image:[UIImage imageNamed:@"check"] selectedImage:[UIImage imageNamed:@"check"] tag:1]; es.contentView.highlightIconColor=[UIColor colorWithHexString:@"9c1823"];
提示找不到contentView属性
如果不通过cocoapod,直接将文件拷贝到项目目录,contentView加上@objc则不会有这个问题。
原代码
open var contentView: ESTabBarItemContentView?
修改为
@objc open var contentView: ESTabBarItemContentView?
希望您能百忙之中关注一下
是用swift什么版本编译的?
是用swift什么版本编译的?
swift 5