SwiftUI now support for Mesh Gradients.
SwiftUI
How to create Onboarding View with PageControl in SwiftUI?
SwiftUI came with very easy implementations in many type of areas in development. We can create onboarding view easily in few minutes far better than storyboard and UICollectionView.
So, I have created sample code for this.
Let’s Code!
How to pass Data between Views in SwiftUI using a property?
I will demonstrate today how to pass data between views in the SwiftUI by using property.
How to populate JSON response in SwiftUI List?
Today I will show you how to display the data from the JSON API response to list view of SwiftUI.
How to create Navigation Bar in SwiftUI? Check here!
Let see how to create navigation bar in SwiftUI.
SwiftUI Animations – 3D Rotation Effect
SwiftUI has lots of new features with easiest way of implementation. In this tutorial, you’ll learn how to add fancy 3D animations with SwiftUI.
rotation3DEffect
The rotation3DEffect() modifier gives output like as rotating views in 3D.
This modifier have two parameters:
angle: for rotate view in specified angle/degrees
axis: for X, Y and Z axis to perform rotation.
For Example:
1 2 |
Text("SwiftUI Animations") .rotation3DEffect(.degrees(45), axis: (x: 1, y: 0, z: 0)) |
Let’s Do It With Animation
Now we will create one button with rotating view by 3D Effect.
Gradient in SwiftUI
SwiftUI comes with easiest way of coding!
In SwiftUI they have given 3 types of gradients, you can easily show gradients on any of the view.
- Linear Gradient
- Radial Gradient
- Angular Gradient
In gradient option we have to pass array of colors.
SwiftUI Tutorial – Creating and Combining Views
SwiftUI announced in WWDC 2019. It’s an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. In previous blog I have shared some references from apple documents.
We will learn it by examples. First of all let’s start with simple UI.