SwiftColorPicker icon indicating copy to clipboard operation
SwiftColorPicker copied to clipboard

Crashes when appearing, Plus screen size

Open sarambasich opened this issue 9 years ago • 5 comments

I have a set up like so:

img_0028

But I repeatably/consistently get crashes on this line, using my iPhone 6 Plus and 6s Plus simulator:

https://github.com/MrMatthias/SwiftColorPicker/blob/2fdaf66f186e868f66a4cf751d10923e69960e0b/Source/PickerImage.swift#L76

screen shot 2016-02-24 at 10 28 13 pm

Something weird happening to the CFMutableDataRef? Size not expected?

It's worth nothing I took that screenshot of the UI in the crashed state.

sarambasich avatar Feb 25 '16 03:02 sarambasich

Currently the size has to be fixed or the buffers need to be adjusted

MrMatthias avatar Feb 25 '16 09:02 MrMatthias

Thanks for the quick response! Can you elaborate? Does that mean I need to set a specific width by height size to the color picker area?

sarambasich avatar Feb 25 '16 14:02 sarambasich

yes, setting a width and height constraint works.

MrMatthias avatar Mar 01 '16 19:03 MrMatthias

I can't seem to set a w/h constraint that works for Plus size as well as regular size. They are different sizes, so they need different values...but they are the same size class so I can't use class sizes to set different values.

I tried dynamically adjusting the width constraint in viewDidLoad(), but that didn't seem to work.

You said "size has to be fixed or the buffers need to be adjusted"...how can I adjust the buffers?

This is a great color picker, but if it explodes on some phones, then that's a dealbreaker. :(

Please help?

Thanks brian

doubleforte avatar Dec 23 '16 01:12 doubleforte

Also having issues with Plus size again. Adding it as a custom class in a storyboard causes a crash. Adding in code doesn't crash. Instead, moving the finger causes graphical glitches, even with set width/height.

sarambasich avatar Dec 30 '16 02:12 sarambasich