Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Ionic Cookbook

You're reading from   Ionic Cookbook Over 35 exciting recipes to spice up your application development with Ionic

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher Packt
ISBN-13 9781785287978
Length 264 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Phan Phan
Author Profile Icon Phan
Phan
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Ionic Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Creating Our First App with Ionic FREE CHAPTER 2. Managing States and Navigation 3. Adding Device Features Support 4. Offline Data Storage 5. Handling Gestures and Events 6. App Theme Customization 7. Extending Ionic with Your Own Components 8. User Registration and Authentication 9. Saving and Loading Data Using Firebase 10. Finalizing Your Apps for Different Platforms Index

Animating an app using requestAnimationFrame with event binding


Animation is always a tricky part when it comes to mobile app development. The main reason behind this is that you really have to know how JavaScript or CSS animation works. Otherwise, if you use external libraries, you will run into performance problems such as jerky movements. In addition to this, there are many ways that can be used to bind an animation stage with a native touch event of the device. So, it always takes a little extra effort to get a good result.

In this recipe, you will learn how to:

  • Detect a scroll event

  • Bind the scroll position on pull down in order to slightly zoom the image

  • The image zoom has exact ration is the scroll bounce

This example is similar to many apps with a profile page such as a Twitter iOS app. The top image can be the user's profile picture. The following is a screenshot of the app that you will build:

Getting ready

You can test this in a web browser. However, it's recommended that you use a physical...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images