When enabling skeleton mode in a text-based view (`UILabel`,
`UITextView`, `UITextField`), it sets the `textColor` to `.clear`,
which is fine when `text` is used, but causes problems when
`attributedText` is used, as it effectively "resets" the string to have
a single color.
Additionally, when a `UILabel` is nested inside a `UIStackView` a
dummy string `" "` was set on the label's `text` so that it didn't have
a 0 height content size. However, this workaround didn't consider the
case where the label already had a non-empty text, meaning that this
(intrusive) `text = " "` broke existing code by clearing the label's
contents.
By improving the corresponding `RecoverableXState` structs, we are able
to preserve each element's contents and state as skeleton is disabled.
Fixes#518.
## Changes
- Create new `RecoverableLabelState` containing a `attributedText` and
`text`, and use it on `UILabel`.
- Update `RecoverableTextViewState` and `RecoverableTextFieldState` to
have a `attributedText`.
- Check if `UILabel`'s `text` is empty before setting dummy value when
enabling skeleton mode in a label nested inside a `UIStackView`.
- Introduce `shouldCenterTextVertically` in `SkeletonTextNode` to center align UILabels and keep UITextViews unaltered.
- Shift down CALayers after assigning frames in `updateMultilinesLayers` function in `CALayer+Extensions.swift`
* Apply lastLineFillPercent for single line views as well.
Fixes#430
* Update readme to include single_lastline.png
* Remove singleline_lastline.png asset added to demo last line in single line views.
* Simplify lastLineFillPercent related update in readme file.
* Fix grammar in readme.