• 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: Development <email@hidden>
  • Date: Tue, 12 Jul 2011 09:26:09 -0700

Well because the label can be rotated, I had to stick it inside of another view (Otherwise when I moved or scaled it, the whole thing went nuts). So in that view's code where the actual  shadow was set it resizes it's rectangle as well as the label's.
However, on the bright side using CALayer for the shadow fixes everything, and now the text, italic, bold, regular, shadowed or not looks great.
Using the same technique I also fixed an issue I'd had in Image shadows so those look great too.


On Jul 12, 2011, at 8:37 AM, David Duncan wrote:

> 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: Kyle Sluder <email@hidden>
References: 
 >iOS: String Drawing (From: Development <email@hidden>)
 >Re: iOS: String Drawing (From: David Duncan <email@hidden>)

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