Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

how to add an image in swift

//The first step is to rename the image you want to add into your xcode project
//Then, drag the picture to the Assets.xcassests folder.
//Next, use the Image struct and init(name) to display the picture

//For example, if your picture in the Assets.xcassests folder is named daddy, then to get the picture, use

Image("daddy")

//There are more modifiers to the Image but that will not be discussed here
Source by www.simpleswiftguide.com #
 
PREVIOUS NEXT
Tagged: #add #image #swift
ADD COMMENT
Topic
Name
1+2 =