Skip to content

Suggestions for setting image in button #36

@JamaicanRumCream

Description

@JamaicanRumCream

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions