开发者

show a detaildisclosure button to the uitableview without custom cell

开发者 https://www.devze.com 2022-12-22 17:51 出处:网络
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

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

精彩评论

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