开发者

how to set the style of the TableView to "UITableViewCellStyleSubtitle"

开发者 https://www.devze.com 2022-12-13 14:34 出处:网络
how to set the style of the TableView to \"UITableViewCellStyleSubtitle\". 开发者_JAVA技巧sothat i can use it to display as sub title in UITABLEIt\'s not a style of the UITableView, but of the UITable

how to set the style of the TableView to "UITableViewCellStyleSubtitle". 开发者_JAVA技巧 so that i can use it to display as sub title in UITABLE


It's not a style of the UITableView, but of the UITableViewCell:

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

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView1 dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }
    ... more stuff

    return cell;
}
0

精彩评论

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