代码之家  ›  专栏  ›  技术社区  ›  benhowdle89

uiImageView上的if语句不工作

  •  0
  • benhowdle89  · 技术社区  · 15 年前

    我将ib出口声明为uiImageView,并尝试此代码:

        - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
        id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
        return [sectionInfo numberOfObjects];
        if (section > 1){
            mySpeech.hidden = YES;
        }
    }
    

    myspeech是uiImageView…

    但它不起作用!有什么想法吗?

    1 回复  |  直到 12 年前
        1
  •  1
  •   Eiko    15 年前

    你需要把它 return 最后一个语句,因为它之后的任何内容都不会被执行。