I am using the cocoapod XLPagerTabStrip to implement PagerTabStrip in my iOS app. I get the below warning message while building or running the app
Variable 'self' was written to, but never read
This warning occurs from the following closure code that is used to change the item text color on swipe.
changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
guard changeCurrentIndex == true else { return }
oldCell?.label.textColor = .lightGray
newCell?.label.textColor = .black
}
- Swift version: 5
- Xcode version: 12.1
- XLPagerTabStrip: 9.0.0
Can someone please help me to get rid of this warning message?