The code below shows how to:
- Create a UIImage with an image file
- Create a UIImageView with the dimensions of the UIImage
- Add the UIImage to the UIImageView using the image property
- Add the UIImage to the View
- Create a CGAffineTransform CGAffineTransformMakeRotation
- Apply the CGAffineTransformMakeRotation to the UIImageView
- Create a UIImage with an image file
- Create a UIImageView with the dimensions of the UIImage
- Add the UIImage to the UIImageView using the image property
- Add the UIImage to the View
- Create a CGAffineTransform CGAffineTransformMakeRotation
- Apply the CGAffineTransformMakeRotation to the UIImageView
The referenced “image.png” needs to be dragged into the Resources folder of your project inside Xcode. This action will prompt you to confirm the copying of the file to the project folder.
No comments:
Post a Comment