Getting square corners of UITableView grouped style???
Getting square corners of UITableView grouped style???
- Subject: Getting square corners of UITableView grouped style???
- From: "Ignacio Enriquez" <email@hidden>
- Date: Thu, 6 Nov 2008 08:58:22 +0900
I hope this is the right place to write this question:
Well, I have created my table and created custom cells (they are
initialized with CGRectZero) and I have to be missing something
because I got the cells ok. But they are shown with an ugly square
corner even though the table is grouped style table. Is like if they
were small plainStyle tables. They get rounded after the table
controller has been pushed in. but when I scroll it then they become
squared again.
I would be very thankful if someone could tell me what I am missing
here. Thanks is advance.
Ignacio.
This is what I have wrote.
//from the my table controller data source:
- (UITableViewCell *)tableView:(UITableView *)thisTableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
//EVLesson is my customized cell
EVLessonCell *cell = (EVLessonCell *)[thisTableView
dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil)
cell = [[[EVLessonCell alloc] initWithFrame:CGRectZero
reuseIdentifier:CellIdentifier] autorelease];
//EVLesson is a wrapper class with some necessary info to draw the cell
EVLesson * aLesson = [[EVLesson alloc] init];
aLesson = [[EVLessonsData sharedLessons].lessonsArray
objectAtIndex:(int)(indexPath.row+(indexPath.section*5))];
[cell setEVLesson:aLesson];
return cell;
}
@interface EVLessonCell : UITableViewCell {
EVLessonCellView *lessonCellView;
}
-(void)setEVLesson:(EVLesson *)newLesson;
@property (nonatomic, retain) EVLessonCellView *lessonCellView;
@end
@implementation EVLessonCell
@synthesize lessonCellView;
-(id) initWithFrame: (CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier{
if(self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]){
//create a lesson view and add it as a ubview of selfs contentView.
CGRect lessonCellViewFrame =
CGRectMake(0,0,self.contentView.bounds.size.width,
self.contentView.bounds.size.height);
lessonCellView = [[EVLessonCellView alloc] initWithFrame:
lessonCellViewFrame];
lessonCellView.auto resizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.contentView addSubview:lessonCellView];
& nbsp;
}
return self;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden