Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

load image from url in Image swiftui (iOS 15)

AsyncImage(
  url: "https://dogecoin.com/assets/img/doge.png",
  transaction: .init(animation: .easeInOut)
) { image in
  image
    .resizable()
    .aspectRatio(contentMode: .fit)
}. placeholder: {
  Color.gray
}
  .frame(width: 500, height: 500)
  .mask(RoundedRectangle(cornerRadius: 16)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #load #image #url #Image #swiftui
ADD COMMENT
Topic
Name
6+7 =