
There is table inside cell and every tiny cell can be clicked to trigge开发者_如何学编程r another page.
This looks like Twitter app.
I think, these methods may help you:
- Create a UIView with 2 Label for Number and Text; name it labelView
- Make a button [UIButton alloc] buttonWithType: UIButtonTypeCustom]
- Add your lableViewas a subview of this button.
- Make a cell with 2 button: side by side
- To make the seperator: - #import <QuartzCore/QuartzCore.h>, then- labelView.layer.borderSize = 1;- labelView.layer.borderColor = [UIColor grayColor].CGColor;
- Manually move your buttons to appropriate position. You may want to use: - cell.contentView.clipsToBounds = YESalso
Hope this help.
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    NSString* cellIdentifier = @"cellIdentifier";   
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    UIButton* tempBtn1;     
    UIButton* tempBtn2;     
    if(cell == nil)
    {
        cell = (UITableViewCell*) [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
        tempBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        tempBtn1.tag = 123;
        tempBtn1.frame = CGRectMake(0, 0, 160, 44);
        [tempBtn1 setTitle:@"firstBtn" forState:UIControlStateNormal];
        [cell.contentView addSubview:tempBtn1];
        tempBtn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        tempBtn2.tag = 234;
        tempBtn2.frame = CGRectMake(160, 0, 160, 44);
        [tempBtn2 setTitle:@"secondBtn" forState:UIControlStateNormal];
        [cell.contentView addSubview:tempBtn2];     
    }
    else {
        tempBtn1 = (UIButton*)[cell.contentView viewWithTag:123];       
        [cell.contentView addSubview:tempBtn1];         
        tempBtn2 = (UIButton*)[cell.contentView viewWithTag:234];       
        [cell.contentView addSubview:tempBtn2];     
    }
    return cell; 
}
Create a UIView subclass. This will represent one item (1/2 of the cell content). Add two of these in each cell. Detect touches in this UIView subclass and push new ViewController when you get the touch events.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论