You should set bounds form attachment to resize image like this:
attachment.bounds = CGRectMake(0, 0, yourImgWidth, yourImgHeight)
More Related Contents:
- Extract UIImage from NSAttributed String
- How to use NSUnderlineStyle.PatternDot
- How do I export UIImage array as a movie?
- Explaining difference between automaticallyAdjustsScrollViewInsets, extendedLayoutIncludesOpaqueBars, edgesForExtendedLayout in iOS7
- How to Apply Gradient to background view of iOS Swift App
- Background Location Services not working in iOS 7
- Tricks for improving iPhone UITableView scrolling performance?
- How to Resize image in Swift?
- Can I load a UIImage from a URL?
- Base64 Decoding in iOS 7+
- iOS7 UITextView contentsize.height alternative
- Auto layout constraints issue on iOS7 in UITableViewCell
- Example of NSAttributedString with two different font sizes?
- How to set image for bar button with swift?
- Save images with phimagemanager to custom album?
- Change string color with NSAttributedString?
- Is it possible to disable Control Center in iOS 7 programmatically and if not, what are alternatives?
- How to resize an image in iOS? [duplicate]
- Pixel Array to UIImage in Swift
- How to disable back swipe gesture in UINavigationController on iOS 7
- iOS 7 – is there a way to disable the swipe back and forward functionality in Safari?
- How to calculate actual font point size in iOS 7 (not the bounding rectangle)?
- How do you create a UIImage View Programmatically – Swift
- Change the color of a link in an NSMutableAttributedString
- How to make custom UIBarButtonItem with image and label?
- How can I change the color of a UIImage? [duplicate]
- UIProgressView custom track and progress images in iOS 7.1
- Using MDM To Configure An Enterprise App Via NSUserDefaults
- AVSpeechSynthesizer in background mode
- How can I both stroke and fill with NSAttributedString w/ UILabel