CopyPastor

Detecting plagiarism made easy.

Score: 1.805450975894928; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2023-05-31
by Ely

Original Post

Original - Posted on 2023-05-31
by Ely



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The badge position can be changed by assigning an `UITabBarItemAppearance` object to the item appearance properties of an `UITabBarAppearance` object, and assign this to the **appearance** property of your **tabBar** control. Example:
let itemAppearance = UITabBarItemAppearance() itemAppearance.normal.badgePositionAdjustment.horizontal = 10 let appearance = UITabBarAppearance() appearance.stackedLayoutAppearance = itemAppearance appearance.inlineLayoutAppearance = itemAppearance appearance.compactInlineLayoutAppearance = itemAppearance
tabBar.standardAppearance = appearance
Positive values seems to shift the badge to the left when using iOS 16, in contradiction to what the documentation says.
When using iOS 13 or newer, the badge position can be changed by assigning an `UITabBarItemAppearance` object to the item appearance properties of an `UITabBarAppearance` object, and assign this to the **appearance** property of your **tabBar** control. Example:
let itemAppearance = UITabBarItemAppearance() itemAppearance.normal.badgePositionAdjustment.horizontal = 10 let appearance = UITabBarAppearance() appearance.stackedLayoutAppearance = itemAppearance appearance.inlineLayoutAppearance = itemAppearance appearance.compactInlineLayoutAppearance = itemAppearance
tabBar.standardAppearance = appearance
According the documentation, the badge should be shifted to the right because 10 is a positive value, but it actually shifted the badge to the left, which I needed. Not sure if this is bug.

        
Present in both answers; Present only in the new answer; Present only in the old answer;