Closed neilt closed 7 years ago
Have the same problem. Any plans to look into this?
Can confirm this is still a problem with Xcode 9 GM. The following test results were from an application compiled with the Xcode 9 GM SDK.
From our limited testing it appears to be an iOS issue and not an SDK issue. We anticipate this will effect existing users upgrading to iOS 11.
Hey guys,
Thanks for reporting.
I'm on it. As soon as I fix it I'll release a new version of PickerView.
Update: It looks like the problem is with the initial calculations of the tableView's content size property.
Something behind the sdk scenes might have changed a bit and is causing it to calculate the content size wrong despite there is no change to the code base.
It's not fixed yet but I'm working to fix and release a new version as soon as possible.
Hi guys, have the same issues, the main problem it's xcode version 9.0 you should use actual version of xcode 8.3.3 fоr example, don't use beta version. When i build my project from xcode 8.3.3 everything is ok, but if i try do the same from xcode 9.0 problem come back.
It looks like I managed to fix it! 🤘
I'll soon release a new version of PickerView with this fix. If you guys want to take a look on the fixed version please look into this branch.
The solution: In iOS 11 the UITableView uses the value of estimatedRowHeight
(even if you didn't set it) to calculate the contentSize
. I was not setting any value to this property and because of it the contentSize
was being calculated wrong by the UITableVIew. Once the user scrolls it the UITableVIew seems to detect that the contentSize is not fitting the real content and then calls the delegate method heightForRowAtIndexPath
to fix the contentSize
.
By setting all the "estimated" properties of the UITableVIew to zero we cancel this new behavior of iOS 11 and the UITableVIew look directly into heightForRowAtIndexPath
to calculate the contentSize
.
I can confirm that your fix does indeed fix the problem in iOS 11 and does not cause any additional problems with iOS 10.3.3, which continues to work correctly.
Thank you.
Hey guys,
The new version has been released. Please let me know if everything is working.
Working for me, thanks.
Selected values don't line up. Not sure if it is the PickerView or Apple, but here it is, none-the-less.
When I click on the number 9 in the first picker it does this.
If i scroll all pickers to the top (0) then back to the correct value, then it looks correct.
Thereafter it seems to work correctly.