替换CYLTabBarController时,plusbutton位置问题

先创建 一个有plus的button
CYLTabBarController做window的keywindow

再创建一个item个数不一样的 CYLTabBarController, 没有plusbutton

然后来回切换。

发现有plusbutton的 CYLTabBarController 会出现itemwidth 会出现错乱

CYLTabbarItemsCount 的个数是全局的, 所以第二次生成的tabbar修改了这个 CYLTabbarItemsCount 个数,然后只有setviewcontroller 方法会对 CYLTabbarItemsCount进行操作,所以获取的 CYLTabbarItemsCount 一直都是后来创建的个数

你可能感兴趣的:(替换CYLTabBarController时,plusbutton位置问题)