Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 1, 2010, 09:43 AM   #1
mikezang
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Why my grouped style Table View without round corner?

I made a table view in nib file and set style to grouped, then I put a TableViewCell into table view, but when I run it, I found it is no round corner in grouped table view?

How can I show round corner?
Attached Thumbnails
Click image for larger version

Name:	SnapShot 2010-10-01 at 23.38.48.jpg
Views:	19
Size:	73.4 KB
ID:	254103   Click image for larger version

Name:	SnapShot 2010-10-01 at 23.39.19.jpg
Views:	44
Size:	126.3 KB
ID:	254104  
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 10:13 AM   #2
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
I'd look into how your background is set for your table view cell.
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 10:27 AM   #3
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Here is my table view cell attributes.
Attached Thumbnails
Click image for larger version

Name:	SnapShot 2010-10-02 at 0.23.46.jpg
Views:	29
Size:	71.9 KB
ID:	254106   Click image for larger version

Name:	SnapShot 2010-10-02 at 0.23.10.jpg
Views:	21
Size:	70.9 KB
ID:	254107   Click image for larger version

Name:	SnapShot 2010-10-02 at 0.22.52.jpg
Views:	20
Size:	43.9 KB
ID:	254108  

__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 10:45 AM   #4
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
Here is my table view cell attributes.
Great. Is there any reason you can think of, related to the background, that would cause the rounded corners to be overlapped?
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 10:47 AM   #5
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
Great. Is there any reason you can think of, related to the background, that would cause the rounded corners to be overlapped?
I am not sure what I have to do, can you tell me?
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 10:50 AM   #6
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
I am not sure what I have to do, can you tell me?
Think about how the layers (subviews) that make up the cell are drawn. Think about how the background colors affect that layering. It may take some creativity and pondering before you come up with the reason.
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 10:57 AM   #7
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
Think about how the layers (subviews) that make up the cell are drawn. Think about how the background colors affect that layering. It may take some creativity and pondering before you come up with the reason.
I don"t know. But I know if I make a grouped table view in programming, I can get round corner, so I thought if I set style to grouped in nib file, it should show as the same in programming without special settings.

I also set background color to white, but I got the same result.

If you don"t want to tell me result, that is ok!

I just use it at the moment, I will do it in programming when I really need it...
Attached Thumbnails
Click image for larger version

Name:	SnapShot 2010-10-02 at 1.07.50.jpg
Views:	23
Size:	72.0 KB
ID:	254113  
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2

Last edited by mikezang; Oct 1, 2010 at 11:08 AM.
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 11:11 AM   #8
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
But I know if I make a grouped table view in programming, I can get round corner, so I thought if I set style to grouped in nib file, it should show as the same in programming without special settings.
If you look closely at the tops of your table sections you will actually see that there is rounded corners. But there is something in your settings that is causing the table sections themselves to render different as well as the cells at the bottom of the sections.

Quote:
Originally Posted by mikezang View Post
I also set background color to white, but I got the same result.
Getting warmer...

Quote:
Originally Posted by mikezang View Post
If you don"t want to tell me result, that is ok!
I'm trying to encourage you to think independently rather than posting a new thread as soon as you encounter a new issue.

Quote:
Originally Posted by mikezang View Post
I just use it at the moment, I will do it in programming when I really need it...
If you did in code the same thing you're doing in IB, you will get the same problem. It's not just the use of IB that is the issue.
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 11:28 AM   #9
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Thanks for your reply.

You know when I found problems, I think about it by myself, then I will google Internet if I couldn"t get any correct result. After that if I still have no answer, I post thread here. I spent several hours for this issue before I post

Like you said, it is best and easy to remember if people can get result by one"s self, but if he had no skills or experience, he has no way to get right result, in this case, a detail tip or hint will let him to get answer.
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 11:56 AM   #10
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Well, I got what I need in programming as below.
Attached Thumbnails
Click image for larger version

Name:	SnapShot 2010-10-02 at 1.56.04.jpg
Views:	31
Size:	87.8 KB
ID:	254115  
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 12:02 PM   #11
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
You know when I found problems, I think about it by myself, then I will google Internet if I couldn"t get any correct result. After that if I still have no answer, I post thread here. I spent several hours for this issue before I post
Well, it's hard for us to guess what you've already tried. So, rather than having us guess, I'd suggest you just tell us. This is quite helpful when your intent is getting answers.

Quote:
Originally Posted by mikezang View Post
...in this case, a detail tip or hint will let him to get answer.
Which, I feel, I've already provided.

But let me try again.

There are two things you can try:
  1. Figure out how the background colors of your subviews are affecting the rendering of your cells.
  2. Adjust the layout of your subviews so that they don't overlap the corners.
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 12:13 PM   #12
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
There are two things you can try:
  1. Figure out how the background colors of your subviews are affecting the rendering of your cells.
  2. Adjust the layout of your subviews so that they don't overlap the corners.
I think later is what I met, but I am not sure how to change the size of my custom cell in IB, though I tried more and more.
But in programming, it is very simple, I don't need to care about size and I got what I need, though I still hope I can do the same in IB.
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 12:33 PM   #13
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
But in programming, it is very simple, I don't need to care about size and I got what I need, though I still hope I can do the same in IB.
What did you do in the programming? Can I see the code? That might help me to explain how you can achieve the same thing via IB.
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 1, 2010, 12:46 PM   #14
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
What did you do in the programming? Can I see the code? That might help me to explain how you can achieve the same thing via IB.
Code as below
Code:
	
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:BrokerCellIdentifier] autorelease];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 150, 25)];
    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(200, 12, 200, 25)];
}
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 1, 2010, 01:44 PM   #15
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
All you're doing is setting the UI elements' frames. This is easily done in IB using the Size Inspector, as seen below:
Attached Images
 
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 2, 2010, 12:09 AM   #16
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
All you're doing is setting the UI elements' frames. This is easily done in IB using the Size Inspector, as seen below:
That is done in IB, but the result is not the same as in programming, this is why I asked here.
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 2, 2010, 12:24 AM   #17
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
Quote:
Originally Posted by mikezang View Post
That is done in IB, but the result is not the same as in programming, this is why I asked here.
Then your code must be doing something else you're not showing. Because the code you showed and the IB settings I showed do do the same thing.

P.S. What is the difference you see?
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is online now   0 Reply With Quote
Old Oct 2, 2010, 12:48 AM   #18
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Quote:
Originally Posted by dejo View Post
Then your code must be doing something else you're not showing. Because the code you showed and the IB settings I showed do do the same thing.

P.S. What is the difference you see?
What do you mean?

The difference is with or without round corner.
I think the different is as below, this due to different result:
IB is to subclass UITableViewCell, and programming is to add Label/TextField to UITableViewCell.
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote
Old Oct 2, 2010, 06:46 AM   #19
mikezang
Thread Starter
macrumors 6502a
 
Join Date: May 2010
Location: Tokyo, Japan
Hi
Now I got what I need in IB, like you said that is cell"s contentView background, I set it to clear color.
Attached Thumbnails
Click image for larger version

Name:	SnapShot 2010-10-02 at 20.43.55.jpg
Views:	21
Size:	44.4 KB
ID:	254211   Click image for larger version

Name:	SnapShot 2010-10-02 at 20.46.47.jpg
Views:	22
Size:	88.2 KB
ID:	254212  
__________________
iPad Mini 32GB, iPhone 4S 16GB, iPad1 32GB, Mac mini 2.53GHz 4GB 320GB, ThinkPad T60
MyApp: Market Event v1.9.2
mikezang is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Conditionally display views on button press johnmerlino Mac Programming 4 Nov 13, 2011 09:11 AM
some help on Editable Detail views kingthong iPhone/iPad Programming 8 Mar 21, 2011 04:56 AM
how to make tableViewController's table grouped style Howiieque iPhone/iPad Programming 8 Aug 3, 2010 11:08 PM
Rounded corners of grouped - style UITableView nacho4d iPhone/iPad Programming 0 Oct 26, 2008 12:36 PM
Rounded Table View Border in Stocks App louden iPhone/iPad Programming 0 Jul 31, 2008 12:18 AM


All times are GMT -5. The time now is 11:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC