- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
Partner *partnerLeft = partnerArrayForSection[(indexPath.row * 2 )];
        NSString *logoUrlLeft = [partnerLeft.logo stringByReplacingOccurrencesOfString:@"big_thumb" withString:@"original"];
        
        [cell.leftCompanyButton setTitle:partnerLeft.url forState:UIControlStateDisabled];
        [cell.leftCompanyButton addTarget:self action:@selector(companyTapped:) forControlEvents:UIControlEventTouchUpInside];
        
        cell.leftCompanyButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
        [cell.leftCompanyButton setImageWithURL:[NSURL URLWithString:URLStringForPath(logoUrlLeft)]
                                                            forState:UIControlStateNormal
                                             placeholderImage:nil];
        
        if ((indexPath.row * 2 + 1) < [partnerArrayForSection count]) {
            Partner *partnerRight = partnerArrayForSection[(indexPath.row * 2 ) + 1];
            NSString *logoUrlRight = [partnerRight.logo stringByReplacingOccurrencesOfString:@"big_thumb" withString:@"original"];
            
            [cell.rightCompanyButton setTitle:partnerRight.url forState:UIControlStateDisabled];
            [cell.rightCompanyButton addTarget:self action:@selector(companyTapped:) forControlEvents:UIControlEventTouchUpInside];
            
            cell.rightCompanyButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
            [cell.rightCompanyButton setImageWithURL:[NSURL URLWithString:URLStringForPath(logoUrlRight)]
                                                                  forState:UIControlStateNormal
                                                   placeholderImage:nil];
        }
        
        return cell;
    }
}
-(void)companyTapped:(id)sender
{
    WebViewController *webViewController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"WebViewController"];
    [self.navigationController pushViewController:webViewController animated:YES];
    [webViewController loadPageWithURL:[(UIButton *)sender titleForState:UIControlStateDisabled]];
}
                                     
        
            Вот что бывает, когда на ячейке две кнопки, в таблице куча секций, а про CollectionView человек не знает