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
SegmentControl animates when changing userInterfaceStyle #2219
Comments
Hi, I copied your code into one of the Eureka examples and it works just fine, no animations for the segmented control labels (Xcode 13.3, Simulator iPhone 13) |
I am not animating anything in the view controller. i tried animate block and change of userInterfaceStyle in switch row. it still affects UISegmentControl. The form elements loads from left. Can this behaviour be altered? Could this be affecting UISegmentControl ? I tried to add my code in the Eureka example code but getting below error. It may unrelated but i was earlier able to run example project. Below is initial part of the error.
|
When i present Preferences View controller in full screen, UISegmentControl works normally. This worked in non full screen but don't get the animation to work. This is not an issue with Eureka though i am sure.
|
So this seems to be an issue with UISegmentedControl when in a view controller that is not full screen? |
Yes Another issue i noticed is how the UISwitch changes colour first appearing as square. Don't know what is causing this strange behaviour. Please check the image above. The form rows load from left. Can this behaviour be altered? They don't load like this in example project. eureka.form.animation.mp4 |
@mats-claassen Any suggestion or solution I can use? |
Sometimes such behaviour has to do with the moment you set up the form. Is that happening in viewDidLoad or later? Are you setting the whole form at once or are you building the viewController's form variable in multiple steps? |
it is in viewDidLoad and one form variable and multiple sections. |
Are you building the self.form variable gradually or assigning it at the end like this: (might be worth a try) let form = Section()
<<< TextRow()
<<< IntRow()
self.form = form |
Thanks. This worked. and found solution to prevent titles getting animated here by adding |
Describe the bug
On selection of new segment, i change userInterfaceStyle in animated block. During this labels of the segmentControl, also animate. How to fix this?
Thanks.
To Reproduce
Expected behavior
Segment control labels should not animate
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: