Open Xcode and either click Create a new Xcode project in Xcode’s startup window, or
choose File > New > Project.
In the template selector, select iOS as the platform, select the Single View Apptemplate, and then
Enter “CustomImage” as the Product Name, select the Use SwiftUI checkbox, and click Next.
Choose a location to save the project on your Mac.
In Canvas on the right click Resume to display the preview. If the canvas is hidden select Editor >
Editor and Canvas to show it.
First we need to add custom image to Assets folder. Drag drop SwiftUi image to mentioned folder.
Image view can be inserted using Image(_:) initializer. In ContentView replace Text view with Image view and name of Image .
To make image Circular we need to add a call to clipShape(Circle()) to apply the circular clipping
shape to the image. The Circle type is a shape that you can use as a mask, or as a view by giving the
circle a stroke or fill.
To add a border to our image view, another circle with a black stroke should be created and then add it as
an overlay to give the image a border.
By adding resizeable() property and using frame property we can width , height and alignment of image.