开发者

show a detaildisclosure button to the uitableview without custom cell

How to show a detail disclosure button to the uitableview without u开发者_如何学JAVAsing the custom cell. I know its by using the accessoryType: method, but don't know how to implement that..pls help..


// Customize the appearance of table view cells.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{

    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    }
    [cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
    return cell;
}

[cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];


cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜