Ey guys, so I want to create a grouped table view which has the first row of the first section be a large image(take up 3/4ths of the screen). I want the other section and table rows to be just visible below this large picture.
So I have created this custom cell that is extremely large, to hold this picture. It’s dimensions are 320(W) x 340(H) pixels. Image’s dimensions: 320(W) x 340(H) along with X:-10 Y:-11. Here is the code for the header part of my custom cell class:
#import <UIKit/UIKit.h>
@interface MainViewHeaderCell : UITableViewCell {
UILabel *cellLabel;
UIImageView *cellImage;
}
@property (nonatomic, retain) IBOutlet UILabel *cellLabel;
@property (nonatomic, retain) IBOutlet UIImageView *cellImage;
@end
I specified the dimensions and customized my cell in Interface Builder. I connected the proper outlets and build and run, but the custom cell I made doesn’t take up 3/4ths of the screen like the image does, resulting in my image going over the next section and next rows of my table. It seems that the custom cell only gets big enough to not force any other rows off the screen, thus the reason for the image overlapping the table rows.
Do you guys have any ideas of what I can do to remedy this problem?
Sounds like you’ve only set the height of the cell in IB.
Make sure you’ve also implemented heightForRowAtIndexPath: