找到了答案,我们可以使用以下代码(不确定这是否正确但可以解决问题)
添加以下代码
newCell?.transform = CGAffineTransform(scaleX: 0.7, y: 0.7)
oldCell?.transform = CGAffineTransform(scaleX: 0.7, y: 0.7)
在以下块的末尾class CommunicateViewController: ButtonBarPagerTabStripViewController
// Changing item text color on swipe
changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, _: CGFloat, changeCurrentIndex: Bool, _: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = .white
newCell?.label.textColor = self?.colorAccent
Enter The Code Here
}