Search code examples
iosuitableviewis-empty

UITableView Empty in iOS 7


I recently updated to Xcode 5 and when i run my application the UITableView appears to be empty:

Here is the code:

     - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
     {
           static NSString *CellIdentifier = @"Notes";
           UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
           id obj = [matchedObjects objectAtIndex:indexPath.row];

            if ([obj isKindOfClass:[Notes class]]) {
                     Notes *note = obj;
                     cell.textLabel.text = note.topic;
                     cell.detailTextLabel.text = note.subject;
                     cell.imageView.image = nil;
             }
             else
             {
                      Picture *picture = obj;
                      UIImage *image = [UIImage imageWithData:picture.image];
                      cell.textLabel.text = NSLocalizedString(@"Image", nil);
                      cell.imageView.image = image;
                      cell.detailTextLabel.text = picture.subject;
             }
             NSLog(@"Cell Text %@",cell.textLabel.text);

             return cell;
       } 

I already implemented:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 10;
}

The white space above appears to be the cells. I think it has something to do with iOS 7. This is worked in xcode 4.5 . Any help is appreciated...


Solution

  • I had a view covering my UITableView. Thanks for everyone that helped!