mindbrix / UIImage-PDF

Simple UIImage PDF renderer category for iOS scalable assets

Home Page:http://blog.mindbrix.co.uk/2012/02/10/ios-scalable-assets/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestions for setting image in button

JamaicanRumCream opened this issue · comments

I have been having problems where the image placed in a button will always scale to fill the button, instead of respecting the provided sizes. I realize it's not the UIImage+PDF problem per se, but do you have any suggestions? Setting a standard PNG file yeilds the right results.
self.logoImageButton.contentMode = UIViewContentModeScaleAspectFit;
UIImage *someImage = [UIImage imageWithPDFNamed:@"Logo.pdf" atSize:CGSizeMake(500, 275)];
[self.logoImageButton setImage:someImage forState:UIControlStateNormal];