You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have custom implementation of dark theme, and user can select theme from inside the application setting. Now, when user either uses system theme, or same theme as device, skeleton color shows smoothly. But lets say if user selects 'Dark' theme in application setting, and user's device is in 'Light' mode, the skeleton displays in light mode for a fraction of second before it switches to dark color, and vice versa.
Seems like some how skeleton is picking device's theme before it switches to application's theme. We are overriding the theme using overrideUserInterfaceStyle = style //.dark, .light OR .unspecified
in viewDidLoad() before adding skeleton to the view.
What type of issue is this? (place an x in one of the [ ])
bug
enhancement (feature request)
question
documentation related
discussion
Requirements (place an x in each of the [ ])
I've read and understood the Contributing guidelines and have done my best effort to follow them.
I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
We are overriding the UIViewController's property inside viewDidLoad based on user's preference from inside app setting: overrideUserInterfaceStyle = style //.dark, .light OR .unspecified
Now, added skeleton view as subview and setting the color for skeleton as: view.showAnimatedGradientSkeleton(usingGradient: SkeletonGradient(baseColor: UIColor.appColor(.gray6)))
UIColor.appColor(.gray6) -> returns adaptive color equals to UIColor.systemGray6
We have tried to set fix color also, but still it shows in device's theme first before setting the color properly.
SkeletonView Environment:
SkeletonView version: 1.8.6 Xcode version: 12.4 Swift version: 4.x
Steps to reproduce:
Please replace this with the steps to reproduce the behavior.
Add this to viewDidLoad: overrideUserInterfaceStyle = .dark
Now add skeleton view as subview on viewController's view
keep your device in light mode (disable dark mode)
show Skeleton using view.showAnimatedGradientSkeleton(usingGradient: SkeletonGradient(baseColor: UIColor.systemGray6))
Expected result:
Skeletons color should always show in provided color.
Actual result:
Skeleton color was displaying in device's theme for fraction of second before displaying the accurate color.
Description
We have custom implementation of dark theme, and user can select theme from inside the application setting. Now, when user either uses system theme, or same theme as device, skeleton color shows smoothly. But lets say if user selects 'Dark' theme in application setting, and user's device is in 'Light' mode, the skeleton displays in light mode for a fraction of second before it switches to dark color, and vice versa.
Seems like some how skeleton is picking device's theme before it switches to application's theme. We are overriding the theme using
overrideUserInterfaceStyle = style //.dark, .light OR .unspecifiedin viewDidLoad() before adding skeleton to the view.
What type of issue is this? (place an
xin one of the[ ])Requirements (place an
xin each of the[ ])Bug Report
We are overriding the UIViewController's property inside viewDidLoad based on user's preference from inside app setting:
overrideUserInterfaceStyle = style //.dark, .light OR .unspecifiedNow, added skeleton view as subview and setting the color for skeleton as:
view.showAnimatedGradientSkeleton(usingGradient: SkeletonGradient(baseColor: UIColor.appColor(.gray6)))UIColor.appColor(.gray6) -> returns adaptive color equals to UIColor.systemGray6
We have tried to set fix color also, but still it shows in device's theme first before setting the color properly.
SkeletonView Environment:
SkeletonView version: 1.8.6
Xcode version: 12.4
Swift version: 4.x
Steps to reproduce:
Please replace this with the steps to reproduce the behavior.
overrideUserInterfaceStyle = .darkview.showAnimatedGradientSkeleton(usingGradient: SkeletonGradient(baseColor: UIColor.systemGray6))Expected result:
Skeletons color should always show in provided color.
Actual result:
Skeleton color was displaying in device's theme for fraction of second before displaying the accurate color.
Attachments:
SkeletonView_bug.mp4