GradientView would not work if its colors were passed during initialization
and never changed after. This was caused by the fact that `CAGradientLayer`'s
colors were updated in `GradientView.colors.didSet`, which isn't
called during `init()`.
Also allow access to `GradientView.gradientLayer` so that users of
that class can build more advanced gradients.
notImplemented() ends up forwarding to fatalError() anyway, but before
it does so it flushes our logs. That's probably good to have. I think
most of these come from the default implementations Xcode provides for
you with a fix-it.
• use NSKeyedArchiver.archivedData(withRootObject:requiringSecureCoding:)
instead of NSKeyedArchiver.archivedData(withRootObject).
• use NSKeyedArchived.unarchivedObject(ofClass:from:) instead of
NSKeyedArchiver.unarchiveTopLevelObjectWithData().
We extend `UIView` with a new method, `renderAsImage`. It always returns a `UIImage`, but we marked its return type as `UIImage?`.
This removes that optionality and updates all callers.
This is a quick workaround for a behavior change in iOS 15.4 that's
causing CVBodyTextLabel to draw stretched or truncated text due to
cell reuse---the text is drawn in the cell's old size (which may be
insufficient, truncating the text), then the size changes and the
content that *is* drawn is potentially stretched.
Credit to Martin for finding this; I just profiled it to make sure it
wasn't going to be prohibitive.
textView(_:shouldInteractWith:in:) were deprecated in iOS 10.
This change is purely deletion of code because newer UITextViewDelegate
methods: textView(_:shouldInteractWith:in:interaction:) were already
implemented.
* refactored async loading of avatar images in HomeView
* async loading avatars does not use extra DispatchWorkItems anymore
* minor code changes, added comments
* made async avatar loading in homeview more robust
* async loading of avatar images in the background should not interfere with foreground operations anymore
* corrected handling of loading avatars not triggered from the home view
* better separation between existing avatar load calls (sync and async) and new async-only call used in HomeViewCell. Should eliminate side-effects and improve performance.