• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Maintaining Image for a UIButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maintaining Image for a UIButton


  • Subject: Re: Maintaining Image for a UIButton
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 19 Jan 2012 08:09:46 -0800

On Mon, 09 Jan 2012 17:12:17 -0800 (PST), R <email@hidden> said:
> This is easy in OSX and bindings.  But how do I maintain the aspect
> ratio of an UIImage place in a UIButton... via [myButton setImage...]
> or [myButton setBackgroundImage...].
>

Use Core Graphics to draw your image to the desired size and aspect ratio *before* you put it in the button. m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: AppleScript recording
  • Next by Date: Re: Controlling iOS scrolling
  • Previous by thread: Maintaining Image for a UIButton
  • Next by thread: Issue in iTunes COM for Windows SDK with iOS5
  • Index(es):
    • Date
    • Thread