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?
How can I show round corner?
Great. Is there any reason you can think of, related to the background, that would cause the rounded corners to be overlapped?Here is my table view cell attributes.
I am not sure what I have to do, can you tell me?Great. Is there any reason you can think of, related to the background, that would cause the rounded corners to be overlapped?
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 am not sure what I have to do, can you tell me?
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.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.
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.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.
Getting warmer...I also set background color to white, but I got the same result.
I'm trying to encourage you to think independently rather than posting a new thread as soon as you encounter a new issue.If you don"t want to tell me result, that is ok!
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.I just use it at the moment, I will do it in programming when I really need it...
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.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
Which, I feel, I've already provided....in this case, a detail tip or hint will let him to get answer.
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.There are two things you can try:
- Figure out how the background colors of your subviews are affecting the rendering of your cells.
- Adjust the layout of your subviews so that they don't overlap the corners.
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.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.
Code as belowWhat 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.
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)];
}
That is done in IB, but the result is not the same as in programming, this is why I asked here.All you're doing is setting the UI elements' frames. This is easily done in IB using the Size Inspector, as seen below:
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.That is done in IB, but the result is not the same as in programming, this is why I asked here.
What do you mean?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?