filmov
tv
How to Create Custom Circle Image with Swift UI - Swift 5 , Xcode 11, Swift UI Tutorials - #4

Показать описание
Custom Circle Image with Swift UI - Swift UI Tutorials - #4
Hello Everyone!
I am Rozeri Dilar
In this video series we will create a map view, with circled image and text view in VStacks and HStacks as we have learned from
SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. Build user interfaces for any Apple device using just one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync. Automatic support for Dynamic Type, Dark Mode, localization, and accessibility means your first line of SwiftUI code is already the most powerful UI code you’ve ever written.
With the name and location views all set, the next thing to do is to add an image for the landmark.
Instead of adding more code in this file, you’ll create a custom view that applies a mask, border, and drop shadow to the image.
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.
Create another circle with a white stroke, and then add it as an overlay to give the image a border.
Next, add a shadow with a 10 point radius.
This completes the image view.
A quick reminder: Make sure you have installed MacOS Catalina and Xcode 11 to play with the canvas in Xcode for Swift UI.
#swiftui #wwdc19 #Xcode11
Hello Everyone!
I am Rozeri Dilar
In this video series we will create a map view, with circled image and text view in VStacks and HStacks as we have learned from
SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. Build user interfaces for any Apple device using just one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync. Automatic support for Dynamic Type, Dark Mode, localization, and accessibility means your first line of SwiftUI code is already the most powerful UI code you’ve ever written.
With the name and location views all set, the next thing to do is to add an image for the landmark.
Instead of adding more code in this file, you’ll create a custom view that applies a mask, border, and drop shadow to the image.
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.
Create another circle with a white stroke, and then add it as an overlay to give the image a border.
Next, add a shadow with a 10 point radius.
This completes the image view.
A quick reminder: Make sure you have installed MacOS Catalina and Xcode 11 to play with the canvas in Xcode for Swift UI.
#swiftui #wwdc19 #Xcode11