小编cry*_*tal的帖子

如何设置cell.imageview框架

我有表视图,我希望我的图像视图重置框架

我使用了以下代码:

[[cell imageView] setFrame:CGRectMake(0,0,32,32)];
Run Code Online (Sandbox Code Playgroud)

但没有任何工作

请让我知道如何调整默认的imageView部分

谢谢

iphone objective-c

8
推荐指数
2
解决办法
1万
查看次数

void SendDelegateMessage(NSInvocation*):委托在等待10秒后无法返回.如何删除这种消息

我在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)

iphone

7
推荐指数
1
解决办法
9170
查看次数

当我们重用单元标识符时,UItableview标头闪烁

我创建了一个单元格

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)

iphone

5
推荐指数
1
解决办法
1136
查看次数

标签 统计

iphone ×3

objective-c ×1