Skip to content

ImageElement

The Image Element type which holds all the information about the images for the guide.

Property Type Description
resource NSString Image resource URL (e.g., "http://abc.com/1.jpg" or "photo.png").
placeholder NSString App inside image, such as "tip_placeholder.png".
backgroundColor UIColor Background color of the image.
imageAlign ImageAlignment Image alignment.
width CGFloat Width of the image, parsed from 150 or 0.9 (e.g., 150 or 90%).
feedWidth NSString Original width obtained from feed, set by the user.
height CGFloat Height of the image, parsed from 150 or 0.9 or 0 (e.g., 150 or 90% or auto).
feedHeight NSString Original height obtained from feed, set by the user.
scale BOOL Whether to keep the original image width/height ratio (true/false).
margin FourSide The offset of the image based on preview’s image-align calculation, default is 0.
boxShadow CGFloat The box shadow of the image.
borderColor UIColor Color of the border.
borderWidth CGFloat Width of the border.
cornerRadius CGFloat Corner radius

Image Alignment

Enum Constant Value
ImageAlignment_LeftTop 0
ImageAlignment_LeftMiddle 1
ImageAlignment_LeftBottom 2
ImageAlignment_CenterTop 3
ImageAlignment_CenterMiddle 4
ImageAlignment_CenterBottom 5
ImageAlignment_RightTop 6
ImageAlignment_RightMiddle 7
ImageAlignment_RightBottom 8

Last update: 2024-01-30