Various improvements + Adding shortcuts for labels & images #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey Charles,
thanks for your Linear Layout View! I built something similar some time ago. But your approach (with wrapped LayoutItems) is better than mine. Still I had some Ideas, that would also improve your layout class. I would love, if you would merge them.
There are 6 commits, the commit message explains most of them. But here are some more comments:
e39bf56 fixed missing scroll indicators:
The ScrollIndicators are actual subviews of a UIScrollView, so you remove them in removeAllItems currently.
ee2482a respect scrollView content insets:
The sizes are currently wrong, if so. uses insets on the scrollView
cda57ed performance increase | only relayout, if needed:
All of your layout code gets calles on every scrolling movement (change in contentOffset). This results in a quite bad scrolling performance (depending on device and count of layoutItems)
98ac5a2 added adding shortcuts for text & images:
I like to have a fast way to display some images and texts in a UIScrollView - if you don't think this should be part of your class, leave this commit out. But I like it very much.
Cheers Markus (@jaydee3 on twitter)