[ad_1]
I would like to maneuver a uitabbar badge decrease than its default place.
In present accepted options, I got here throughout the beneath code, however for some motive the badge doesn’t transfer. (I invoke the operate after loading the uitabbarcontroller viewcontrollers)
Any steering can be appreciated.
func repositionBadge(tab: Int){
for tabBarButton in self.tabBar.subviews {
for badgeView in tabBarButton.subviews {
let className=NSStringFromClass(badgeView.classForCoder)
print(className)
if className == "_UIBadgeView"
{
badgeView.layer.rework = CATransform3DIdentity
badgeView.layer.rework = CATransform3DMakeTranslation(-100.0, 100.0, 100.0)
}
}
}
}
[ad_2]
