Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-05-2008, 04:53 PM   #1 (permalink)
Registered Member
 
Groucho's Avatar
 
Join Date: Jun 2008
Posts: 161
Groucho is an unknown quantity at this point
Default Outline text in a UILabel?

Is there a way to outline text in a UILabel? I don't see any reference to such a thing in the UILabel or UIFont class reference, but it'd be nice...

Thanks!
__________________
Bryan Duke
acceleroto.com

Groucho is offline   Reply With Quote
Old 11-03-2008, 06:27 PM   #2 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 22
digitalhobbit is on a distinguished road
Default

Just curious if you've ever been able to figure out how to do this, as I'm trying to do get this working right now as well.
digitalhobbit is offline   Reply With Quote
Old 11-03-2008, 08:51 PM   #3 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 1,431
PhoneyDeveloper is on a distinguished road
Default

Have you played with the shadowOffset and shadowColor? This might do what you want.
PhoneyDeveloper is offline   Reply With Quote
Old 11-03-2008, 09:33 PM   #4 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 22
digitalhobbit is on a distinguished road
Default

Shadow is not quite what I'm looking for, as the offset only applies for one side of the text (e.g. bottom right if I specify an offset of (+1, +1)). What I'm looking for is essentially a shadow for all directions at once.

Looks like I might have to use my own CG text drawing routines instead, in which case I should be able to use kCGTextFillStroke to achieve the outline effect, although I haven't tried this yet.

I also found an older Cocoa (not iPhone) forum post where someone suggested drawing the text 5 times (once each in black with an offset for each of the four cardinal directions, and once in white for the middle). Sounds a bit cumbersome and inefficient, but in case the kCGTextFillStroke approach should not work, I suppose this might be a fallback solution...
digitalhobbit is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UILabel alignment question uprise78 iPhone SDK Development 7 04-06-2012 05:15 PM
Bold font in UILabel? martinn iPhone SDK Development 10 12-05-2011 02:51 AM
UILabel Animation torynfarr iPhone SDK Development 3 07-20-2010 10:36 AM
UILabel background color mademo iPhone SDK Development 3 02-10-2010 09:04 AM
Text Orientation in a UILabel torynfarr iPhone SDK Development 2 05-20-2008 11:37 AM


» Advertisements
» Online Users: 332
7 members and 325 guests
blueorb, guusleijsten, jbro, Kryckter, LEARN2MAKE, n00b, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:57 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0