• 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: iOS: String Drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS: String Drawing


  • Subject: Re: iOS: String Drawing
  • From: David Duncan <email@hidden>
  • Date: Tue, 12 Jul 2011 08:37:49 -0700

On Jul 11, 2011, at 11:49 PM, Development wrote:

>    CGSize newSize = rect.size;
>    CGSize imgSize = [self.text sizeWithFont:self.font];
>    imgSize.width +=6; //this does nothing
> 	//everything below adjusts for the shadow which is a flipping train wreck of its own.
> 	CGPoint  p;
> 	CGFloat x=0.0,y=spread;


Just for the record, the likely reason why this does nothing is because the rect you specify to draw the text into is still going to be clipped by the width of the UILabel – so if the label is X points wide, it really doesn't help to ask to draw into a rectangle X+6 points wide – you need the label to be X+6 points wide.
--
David Duncan

_______________________________________________

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

  • Follow-Ups:
    • Re: iOS: String Drawing
      • From: Development <email@hidden>
References: 
 >iOS: String Drawing (From: Development <email@hidden>)

  • Prev by Date: Re: CAOpenGLLayer content size
  • Next by Date: Re: Adding Spotlight comment data to folder/file
  • Previous by thread: Re: iOS: String Drawing
  • Next by thread: Re: iOS: String Drawing
  • Index(es):
    • Date
    • Thread