NativeScript Animation of ANY View Property
Автор: Alex Ziskind
Загружено: 2019-05-28
Просмотров: 5588
You can animate any view in NativeScript and any property, not just the ones that CSS exposes or the NativeScript Animation API allows you to manipulate. In this NativeScript tutorial I explain how to build up an animation from scratch, and you can reuse these animation functions in NativeScript Core, NativeScript Angular, and NativeScript Vue projects.
If you haven't already seen the related video on how to create shapes in NativeScript apps, then check this one out: • NativeScript Shapes | 2 Methods for Creati...
JavaScript animations can handle things that CSS can’t.
For instance, moving along a complex path, with a timing function different from Bezier curves. An animation can be implemented as a sequence of frames by making small changes to UI View properties.
For instance, changing View.marginTop from 0 to 100 moves the element down. And if we increase it in setInterval, changing by 2 with a tiny delay, like 50 times per second, then it looks smooth. That’s the same principle as in the cinema: 24 frames per second is enough to make it look smooth, however, we're going to be as close to 60 frames per second as we can here.
► SHARE
Share this video with a friend to help them animate their native JavaScript apps:
• NativeScript Animation of ANY View Property
Share the entire NativeScript playlist to help your friends with their native iOS and Android apps written with JavaScript:
• NativeScript Tutorials
► ASK
If you have a topic you want me to make a video about use #iscriptnative in the comments.
►LET'S CONNECT
Alex on Twitter: / digitalix
NativeScripting on Twitter: / nativescripting
► FREE + PREMIUM NATIVESCRIPT COURSES
https://nativescripting.com
Take 25% off any premium NativeScript course by using the coupon code YOUTUBE
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: