I have UIImage and I want to scale it without setting it into UIImageView. How I can do that ?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
As @rckoenes mentioned, UIImage is simply an image object, it does not handle display, which is precisely what UIImageView is for.
For pinch zooming an image, the easiest way is to add a UIImageView as a subview to a UIScrollView.
If what you wanted was to change the size of your UIImage, I answered this here: set size of an image programatically
Simply do this: