What's New in SwiftUI 3.0

 

SwiftUI 3.0 available on iOS 15, iPadOS 15, macOS 12, and watchOS 12.

Markdown Support and New AttributedString API

  • In swiftUI 3.0 we can modified string using markdown and attributedString
  •  
  • We can add a string with markdown syntax as below:-

Text("**Connect** on [Twitter](url_here)!")

Connect on Twitter

  • If customize a range of character in string then use attributed string as per below:-

do {

let thankYouString = try AttributedString(
markdown:"**Welcome** to
[website](https://example.com)")

} catch {

print("Couldn't parse: \(error)")

}

New Button Style

  • Cancel
  •  
  • Destructive
  •  
  • None
  •  
  • Some (Publisher)
  •  
  • You can apple Bordered button style, Borderless button style, plain button style and default button style by using the button style modifier

    New Button Style

AsyncImage for load image from url

  • SwiftUI Abstract all long process by using async image 

AsyncImage(url: URL(string: <url_here>)!)

  • You can also add a placeholder while fetching image

    AsyncImage

Better keyboard management


Continue Reading: What's New in SwiftUI 3.0


Comments

Popular posts from this blog

Why React Native is the Way Forward for Startups?

An Introduction to Creating Games and NFT Art with Unreal Engine

xCode 13 new features