iOS 23-自定义cell上的button点击事件.
1.在cell里,.h写一个Block.
@property (nonatomic,copy)void(^telephoneBlock)();
2. 在cell里,.m写一个点点击事件.
- (IBAction)didclickPhone:(id)sender {
    
    if (self.telephoneBlock) {
        self.telephoneBlock();
    }
}
3.在- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        cell.telephoneBlock=^(){
         
            NSLog(@"phonenumber is ======%@",shopmodel.phone);
        };
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号