Error and crash while using using UIDatePicker on Mac, Swift, Xcode

Viewed 237

I have a date picker in my app and it was working fine up until I updated to the latest Xcode.

Now when I use it it crashes and gives this error.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIDatePickerMacCompactView _setTextColor:]: unrecognized selector sent to instance 0x11135ae50'

This is an app that is on iOS and Mac OS using catalyst.

The date picker works fine on the iOS devices but crashed like this on the Mac version.

Has anyone got any idea on what may be happening, I cannot find the UIDatePickerMacCompactView in there files anywhere.

1 Answers

Just by reading the error message, are you setting the text color as UIColor instead of NSColor by chance. I have little experience with Catalyst so I might be wrong but that's my 2 cents.

Related