UITableView: Handle cell selection in a mixed cell table view static and dynamic cells

后端 未结 6 1986
谎友^
谎友^ 2020-12-05 17:30

I am trying to mix dynamic and static cells in a grouped table view: I would like to get two sections with static cells at the top followed by a sec

6条回答
  •  醉话见心
    2020-12-05 17:39

    UITableViewCell *cell = [self dequeueReusableCellWithIdentifier:@"cellIdentify"];
    if (cell == nil)
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellIdentify"];
    

    Just you dont call alloc. If you dont want to reuse, just dont call dequeueReusableCellWithIdentifier.

提交回复
热议问题