Truncation and resizing would be super simple to implement since the UIStringDrawing handles all that for you. Simply make UIView that autoresizes and have the content style to redraw. SO a couple lines there. Then a drawRect with the UIStringDrawing methods to the size of the view and voila - its pretty much done.

It'd be less code than this thread :D

On Oct 15, 2009, at 11:20 AM, Eric E. Dolecki wrote:

Thanks Luke. This might be a nice feature request to be able to do this easily (and let's say truncation and resizing would not work if implemented
(I realize the pitfalls)).
Eric

On Thu, Oct 15, 2009 at 9:46 AM, Luke the Hiesterman <luket...@apple.com >wrote:

If you don't want to use labels, you can draw the text yourself using
UIStringDrawing methods. Otherwise, you need two labels for this.

Luke


On Oct 15, 2009, at 6:45 AM, Eric E. Dolecki wrote:

I have a simple question. In my application (iPhone) I am displaying the
current time.

NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];

[formatter setTimeStyle:NSDateFormatterShortStyle];

NSDate *date = [NSDate date];

[formatter setDateFormat:@"h:mm a"];

[clockLabel setText:[formatter stringFromDate:date]];


However I would like the AM or PM to display in a smaller font than the
rest
of the time string in my UILabel. How do I go about introducing that
without
resorting to using a separate UILabel?


9:00 AM


Thanks,

Eric
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh %40apple.com

This email sent to luket...@apple.com





--
http://ericd.net
Interactive design and development
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net

This email sent to a...@webis.net

Alex Kac - President and Founder
Web Information Solutions, Inc.

"You cannot build a reputation on what you intend to do."
-- Liz Smith




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to