• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting square corners of UITableView grouped style???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: UIScrollViewDelegate methods and touches with customized UITextView
  • Next by Date: Re: Dual screen problems
  • Previous by thread: Re: NSTableView highlited text color
  • Next by thread: [Q] How to add nested items to NSOutlineView?
  • Index(es):
    • Date
    • Thread