Я использую пользовательскую UItablecell для строк в одном из моих uitableviews.Однако в customtabelcell есть кнопка UIB, которую я хотел бы скрыть на дисплее UItableview.Таможенная ячейка была разработана в IB.Я попробовал следующий код, но он, кажется, не скрывает uibutton:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == 0)
{
static NSString *cellIdentifier = @"customTableCell1";
customTableCell1* myOrderCell1 = (customTableCell1*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (myOrderCell1 == nil)
{
NSLog(@"Cell created");
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"customTableCell1"
owner:nil
options:nil];
for(id currentObj in nibObjects)
{
if ([currentObj isKindOfClass:[customTableCell1 class]] )
{
myOrderCell1 = (customTableCell1 *)currentObj;
}
}
}
myOrderCell1.backgroundColor = [UIColor blackColor];
myOrderCell1.accessoryType = UITableViewCellAccessoryNone;
**myOrderCell1.AddToCartBtn.hidden = YES;
myOrderCell1.AddToCartBtn.enabled = NO**;
return myOrderCell1;
}
У кого-нибудь есть идеи относительно того, что делать?
Спасибо