Fix iconed switch view on iOS 13

This commit is contained in:
Ilya Laktyushin 2019-10-28 23:17:14 +04:00
parent a271b90793
commit 2db0d25dd2

View file

@ -48,6 +48,11 @@ static const void *positionChangedKey = &positionChangedKey;
self.backgroundColor = [UIColor redColor];
self.tintColor = [UIColor redColor];
UIView *handleView = self.subviews[0].subviews.lastObject;
if (iosMajorVersion() >= 13) {
handleView = self.subviews[0].subviews[1].subviews.lastObject;
} else {
handleView = self.subviews[0].subviews.lastObject;
}
static Class subclass;
static dispatch_once_t onceToken;