Comments (2)
@filipealva Any thoughts on this? Hopefully you can take a look
from pickerview.
@johnswifttt I faced same issue. For some reason the PickerView really wants to collapse to zero size. TableView doesn't call the cell for row if it's too small to display it.
The quick fix is adding var builtConstraints: Bool = false
to coordinator and
if !context.coordinator.builtConstraints && pickerView.superview != nil {
let constraints = [
NSLayoutConstraint(item: pickerView, attribute: .height, relatedBy: .equal, toItem: pickerView.superview,
attribute: .height, multiplier: 1, constant: 0),
NSLayoutConstraint(item: pickerView, attribute: .width, relatedBy: .equal, toItem: pickerView.superview,
attribute: .width, multiplier: 1, constant: 0)
]
pickerView.superview?.addConstraints(constraints)
context.coordinator.builtConstraints = true
}
into the update func, hoping that superview doesn't change : ) Seems to work for me.
from pickerview.
Related Issues (20)
- Swift version 2.3 please ! HOT 1
- Programmatically Select Row HOT 6
- [FEATURE] Ability to manage/decrease scrolling speed HOT 1
- [FEATURE] Horizontal scrolling HOT 2
- iOS 11, iPhone 7 Simulator, Xcode Version 9.0 beta 6 (9M214v) - Initial selected values not aligned. HOT 9
- Infinite List on iOS 11 HOT 5
- Unexpected error on xcode 9 and ios 11. HOT 8
- How to support two components? HOT 1
- Stuck in endless while loop, 0 rows for datasource. HOT 3
- `reloadPickerView()` Acting Weird HOT 3
- Build failed: "No such module 'PickerView' in ExamplePickerViewController.swift HOT 1
- [FEATURE] Search items HOT 2
- Can I custom pickerView from nib HOT 1
- [CHORE] Update to swift 4.2 HOT 3
- Empty, selectable entry is shown on iOS 10 HOT 1
- [BUG] False positive orientation changed notifications
- [QUESTION] Errors with version 0.4.0 HOT 1
- How to use multiple columns? HOT 1
- Having auto scroll is the best
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pickerview.