0

I have built a library that adds a view to the screen and allows the developer to customize its appearance by entering custom values in IBInspectable fields.

It used to work just fine, except when I added the localizable branch. I noticed that the custom values entered in the storyboard aren't applied to the view.
I started debugging and printed the IBInspectables' values. Xcode gave me this:

extracting data from value failed

Any idea why that's happening, and what I can do about it?

LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
  • It's weird, there is nothing strange from `1.2 to 1.2.1` and neither from `1.1.2 to 1.2` in your releases. Have you tried to clean the project? – denis_lor Mar 21 '19 at 09:27
  • I just removed the release so people don't upgrade to a dysfunctional version. I'm talking about the code that is in the `localizable` branch. Try that one. – LinusGeffarth Mar 21 '19 at 09:28
  • I just ran your localize branch, and setting initialSelectedIndex from Storyboard does work for me. Can you tell me how to exactly reproduce this? – AjinkyaSharma Mar 21 '19 at 09:39
  • So the localizable branch aims to integrate Localize, an external library for localizing things. I added an `IBInspectable` property `segmentTitleKeys` to the control. Those keys are then taken, localized, and then assigned as titles. When setting the keys in storyboard of the example project, the issue occurred. Notice how it completely ignores the colors you set in the storyboard. – LinusGeffarth Mar 21 '19 at 09:41
  • Put a breakpoint on `updateSelection` inside `LGSegmentedControl.swift` and then do `p options`. In there, it said *extracting data from value failed* for me. – LinusGeffarth Mar 21 '19 at 09:44

0 Answers0