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-07-2010, 06:52 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2008
Posts: 177
skinrock is on a distinguished road
Default UITableView Border

I've been googling this the past couple nights, but I keep getting results in regards to changing the border of UITableView cells, not the UITableView itself. The cell borders are easily changed with the separatorColor property.

Basically I have a grouped UITableView that is about 80% the size of the screen. I set the tableView.layer.cornerRadius to 20 to give it rounded corners, and I also changed the backgroundColor to contrast it against the black screen.

What I want to do is give the entire UITableView a small border to give it a little more style, and make it look like a frame and not just a plain rounded rectangle.

I tried tableView.layer.borderColor = [UIColor darkGrayColor], but that throws a warning saying "incompatible pointer type", and doesn't show any changes when I build it.

Is there an easy way to give it a border, or at least trick it into displaying a border?
skinrock is offline   Reply With Quote
Old 07-07-2010, 07:09 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Posts: 177
skinrock is on a distinguished road
Default

Figured it out, it was related to that warning:

tableView.layer.borderColor = [UIColor darkGrayColor].CGColor;

I'm used to being able to just set the color to the UIColor instance itself (I think it works for backgroundColor), but apparently borderColor requires the CGColorRef.
skinrock 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: 344
14 members and 330 guests
akacaj, c2matrix, cgokey, esoteric, EXOPTENDAELAX, GHuebner, givensur, HemiMG, Mirotion22, mjnafjke, Pudding, SLIC, Sonuye857, Techgirl-52
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,652
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Sonuye857
Powered by vBadvanced CMPS v3.1.0

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