Closed pigeon-archive closed 8 years ago
I will take a look and see if i can replicate the problem.
Are you using Auto-Layout constraints?
Yes.
Same problem here, I just dropped the view and set its class as XMSegmentedControl and bam ! Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 64]'
Hi, I just create a new project, dropped a view and set its class as XMSegmentedControl, without any Autolayout constraint, and it gives me the same error : 2015-12-29 09:54:34.698 myProject[1723:972257] * Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 64]' * First throw call stack: (0x1838a1900 0x182f0ff80 0x1838a1848 0x185f95800 0x185f9575c 0x185f956f4 0x18858bbe8 0x1885961c0 0x188595ce8 0x1000997c0 0x100098604 0x1000981a0 0x10009505c 0x100094d94 0x100094dc8 0x18858f778 0x185f9eb2c 0x185f99738 0x185f995f8 0x185f98c94 0x185f989dc 0x185f920cc 0x183858588 0x18385632c 0x1837856a0 0x188602580 0x1885fcd90 0x100090770 0x1833268b8) libc++abi.dylib: terminating with uncaught exception of type NSException
Hey guys I cannot replicate the error. But there is something wrong for sure. Someone should send me a project so i can see whats going on.
Hello! The problem is with 0 division inside update() method. I've created the pull request with fix proposal.
Hey guys, I already merged ostapkuzyk pull request. I hope that fixes it. I will look into it when i get back home. Let me know if its working for you guys so I can close this issue.
Fixed it for me.
Fixed it for me too. May be it's worth a 0.1.5 release ? Meanwhile, for other reading this, you can use this in your PodFile:
pod 'XMSegmentedControl', :head # :head contains a fix for https://github.com/xaviermerino/XMSegmentedControl/issues/3
How do you fix this issue? I have the same problem when I use the storyboard. However, If I create the segmented control programatically, I don't have this issue. Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 0]'
@lucreibaldi This should be fixed on the master
branch. There just hasn't been a new build released since it was fixed. Try using the master branch instead of a normal release.
For cocoapods 1.2.0.beta.1
pod 'XMSegmentedControl', :git => 'https://github.com/xaviermerino/XMSegmentedControl'
Requires Swift 3.0
I am using two separate instances of
XMSegmentedControl
in different Storyboard files and there is an error that I can't seem to get rid of.If you've found it, I'm confirming more than one person is experiencing it. If not, I'll spend the time to isolate it into its own project and upload it to here.
Cheers. :dancer: