Skip to content

Commit ca338e5

Browse files
authored
docs(animation.md): explain limitations regarding Span and FormattedText (NativeScript#1876)
According to issue #8359, Span and FormattedString cannot be animated, because they are no ui elements. Since the error message is not that helpful for most people, I believe, this should be documented.
1 parent cd3cd7d commit ca338e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/ui/animation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,7 @@ view.animate({
203203
```
204204

205205
> Note: The properties `originX` and `originY` are JavaScript properties and can be assigned via code-behind only via a given `View` reference. We can still use them along with CSS animations, but the values for `originX` and `originY` must be set in the code-behind logic.
206+
207+
## Limitations
208+
209+
- `Span` and `FormattedString` can not be animated. `Span` and `FormattedString` elements are not extending the [`View`](https://docs.nativescript.org/api-reference/classes/__nativescript_core_.view) class, but only [`ViewBase`](https://docs.nativescript.org/api-reference/classes/__nativescript_core_.viewbase). Because of this, neither `Span` nor `FormattedString` are ui elements, making it impossible to animate them and causing a crash on iOS.

0 commit comments

Comments
 (0)