SwiftUI - Circular Image Example.

This tutorial is to display Alert in SwiftUI. As you know in Swift we are using UIImageView to  display image on screen. Now here in SwiftUI we have a class Image to do some thing. Here we are study about Image in SwiftUI and about it's circular Shape. first you create SwiftUI Project.



You are already study "UIImageView Programmatically In Swift 5", This tutorial is only for SwiftUI.

Add image in Asset:
Drag and drop your image in Asset folder.



Simple Image Adding Code: Set image Width and height 150
123Image("swiftui")
.resizable()
.frame(width: 150, height: 150)
Circular Image Adding Code:
123456Image("swiftui")
.resizable()
.frame(width: 200, height: 200)
.clipShape(Circle())
.overlay(Circle().stroke(Color.white, lineWidth: 4))
.shadow(radius: 10)
Output:


Thanks.


Checkout the Jooble if your are looking for a job as an iOS developer. 

SwiftUI - Circular Image Example. SwiftUI - Circular Image Example. Reviewed by KIRIT MODI on 20:06:00 Rating: 5
Powered by Blogger.