12

So I have UIDatePicker initialized programmatically. It has some subviews with NSLayoutConstraints. Also it has a custom text color setValue(textColor, forKey:"textColor"). It is positioned in superview with the help of NSLayoutConstraints.

Every time it stops scrolling some text is produced in Debug area:

<_UIFeedbackRetargetBehavior: 0x60000011b750: prepared=0> is being deactivated more times that it'd been activated, this will raise soon!

So I'm a bit worried. Google finds nothing... Does anybody have an explanation?

Xcode 8. Swift 3. iPhone SE simulator.

iWheelBuy
  • 5,470
  • 2
  • 37
  • 71
  • if you use a plain UIDatePicker without custom text color or layout constraints, do you still get the same errors appearing in the console? – Michael Dautermann Oct 19 '16 at 10:20
  • I'll check tomorrow – iWheelBuy Oct 19 '16 at 15:18
  • I don't see the feedback anymore (changed nothing). Maybe mac reboot fixed the issue... – iWheelBuy Oct 20 '16 at 04:32
  • 1
    I just had the exact same issue (Xcode 8.1, Swift 3, iPhone 6 Plus). The debug message makes no sense at all. What is being deactivated, and what will raise soon, and what does "raise" mean? I think this might be something goofy with Xcode 8.x. – Ron B. Dec 05 '16 at 14:14
  • 3
    I just had the exact same issue (Xcode 8.1, Swift 3, iPhone 5). I did nothing but recompile and the message is gone. – user2875289 Dec 21 '16 at 08:24
  • "raise" means raise an error/exception, I would guess. – stephent Jun 15 '17 at 19:39

2 Answers2

1

If you still encounter this issue.

What helped for me was making the UIPickerView a class member (not a variable in method's context).

Or you could also have it created in the storyboard/.xib file and link it as an IBOutlet to your class.

Lepidopteron
  • 6,056
  • 5
  • 41
  • 53
-1

I had a similar problem I solved it leaving the first space of the array Example

_Distance = @[@"", @"1Km",@"2Km",@"3Km"];
Erinson
  • 78
  • 8