我有表视图,我希望我的图像视图重置框架
我使用了以下代码:
[[cell imageView] setFrame:CGRectMake(0,0,32,32)];
Run Code Online (Sandbox Code Playgroud)
但没有任何工作
请让我知道如何调整默认的imageView部分
谢谢
我在viewdidload之前加载NSdata中的数据
我得到了以下信息
void SendDelegateMessage(NSInvocation*): delegate failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
If you were not using the touch screen for this entire interval (which can prolong this wait), please file a bug.
Run Code Online (Sandbox Code Playgroud) 我创建了一个单元格
static NSString *CellIdentifier = @"TweetListUserName";
CustomTableViewCell *cell = (CustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[CustomTableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier]autorelease] ;
}
Run Code Online (Sandbox Code Playgroud)
并使用以下代码设置节标题:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView* customView = [[[UIView alloc] initWithFrame:CGRectMake(0.0, -4.0, 320.0, 67.0)]autorelease];
[customView setOpaque:YES];
UIImageView *image = [[UIImageView alloc] initWithFrame:CGRectMake(-2.0, -4.0, 328.0, 67.0)];
[image setImage:[UIImage imageNamed:@"header-msg.png"]];
[image setOpaque:YES];
[customView addSubview:image];
UILabel *label1 =[[UILabel alloc] initWithFrame:CGRectMake(10, 5, 100, 12)];
label1.text =@"TWEETS MATCHING:";
label1.textAlignment=UITextAlignmentLeft;
[label1 setTextColor:[UIColor grayColor]];
[label1 setFont:[UIFont fontWithName:@"Helvetica" size:9]];;
[label1 setBackgroundColor:[UIColor …Run Code Online (Sandbox Code Playgroud)