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-03-2010, 03:33 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default Font & Color in Table

Hi to all

1.for set font to cell i use below code

cell.font=[UIFont systemFontOfSize:14];

but How can i set for example font "A" to this cell ?


2.for change backcolor of cell i use below code

cell.contentView.backgroundColor =[UIColor yellowColor];

but when i set accessorytype to buttonClosure, backcolor of buttonclosure dosen't change Why ?


3.in UIcolor just exist colors like blue,red,yellow,...

how can i use for example paleblue,plaetred,... ?
sajjad111 is offline   Reply With Quote
Old 07-03-2010, 06:01 AM   #2 (permalink)
Registered Member
 
Goldoneh's Avatar
 
Join Date: Nov 2009
Location: ایران
Posts: 45
Goldoneh is on a distinguished road
Default font:

For set custom font you can use this code:
Code:
cell.textLabel.font = [UIFont fontWithName:<#(NSString *)fontName#> size:<#(CGFloat)fontSize#>];
for change color I think the cell.background color dont work and you should use another way but I'm not sure.
you can set label to cell and change label color!
Goldoneh is offline   Reply With Quote
Old 07-03-2010, 09:51 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default

Thanks
How can i use this font in Bold style ?

Last edited by sajjad111; 07-03-2010 at 09:51 PM.
sajjad111 is offline   Reply With Quote
Old 07-04-2010, 04:34 AM   #4 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 53
sajjad111 is on a distinguished road
Default

help
sajjad111 is offline   Reply With Quote
Old 07-12-2010, 12:42 AM   #5 (permalink)
Registered Member
 
Goldoneh's Avatar
 
Join Date: Nov 2009
Location: ایران
Posts: 45
Goldoneh is on a distinguished road
Default

Quote:
Originally Posted by sajjad111 View Post
Thanks
How can i use this font in Bold style ?
sorry I response late ,

Code:
cell.textLabel.font = [UIFont boldSystemFontOfSize:14];
when you type cell. with press Esc button you can see all items that can set for this object and wen you type [UIFont with press Esc you can see all adjective of this item.
__________________
The fantastic free iphone/ipod game:
iWarShip

iMasterMind
Goldoneh 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



» Advertisements
» Online Users: 324
6 members and 318 guests
anothermine, Chickenrig, givensur, michaelhansen, PixelInteractive, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,892
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

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