Animated Rating View in SwiftUI

Learn to create a modern animated rating view in SwiftUI for your projects

Alessandro Manilii
4 min readApr 28, 2022
Photo by cottonbro from Pexels

A typical way to improve an app is asking an opinion to users. The fastest and funnies way to achieve this is asking for a rating value. In everyday apps we are asked to rate so many things… the speed of a connection, the taste of a food, the satisfaction of an experience.

In todays story I’ll show you how to build cool animated modern rating view.

Introduction

As usually let’s start with a small video to show the final result of our tutorial:

As you can see tapping a rating value will fire an animation to smooth the transition between the ratings.

The Basic UI

I started building a fake app for food rating. Just a simple screen with an image, a title and some fake text.

This will be the simple UI:

--

--

Alessandro Manilii

I’m an Italian professional iOS Developer, iOS Tech Lead at Wakala — Join Medium from the following link: https://medium.com/@alessandromanilii/membership