-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skeleton displays in device's selected theme for fraction of second #392
Comments
@Juanpe Did you get any chance to look into it? I would like to drag your attention here. |
Hi @KrishnaKaira, TBH, I could check this issue yet. I'm going to try to check it asap. :) |
I'm observing similar behaviour. But I don't how to fix this. |
I am also experiencing this issue. |
I am also experiencing this issue. Let me know if this issue is fixed now. |
@Juanpe did you get any chance to look into this issue, actually now in latest release it's not just flickering but it picks the system theme only and ignore apps theme.
|
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 .unspecified
in viewDidLoad() before adding skeleton to the view.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in 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 .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.
overrideUserInterfaceStyle = .dark
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.
Attachments:
SkeletonView_bug.mp4
The text was updated successfully, but these errors were encountered: