【发布时间】:2014-07-31 23:33:17
【问题描述】:
这是我的代码:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIImage *myImage = [UIImage imageNamed:@"photo.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:myImage];
imageView.frame = CGRectMake(10,10,60,60);
if (section == 0){
return 0;
}else if (section == 1){
return 0;
}else if (section == 2){
return 0;
}else if (section == 3){
return 0;
}else if (section == 5){
return imageView;
}else{
return 0;
}
}
所以图像出现了,但问题是imageView.frame 不起作用,照片大小看起来等于标题高度,我该如何解决这个问题?
【问题讨论】:
标签: ios objective-c uitableview tableview