0

I have created my App with the awesome ECSildingViewController 2.0. but when i just found the UITableViewCell on the right menu cannot display the icons. it works great on the left menu. Please find the screenshot here:

https://i.stack.imgur.com/Og5Nb.jpg
https://i.stack.imgur.com/GxCI2.jpg

- (NSArray *)menuItems {
    if (_menuItems) return _menuItems;

    _menuItems = @[@"Item 1",@"Item 2"];
    _menuIcons = @[@"play.png",@"heart.png"];

    return _menuItems;
}

#pragma mark - UITableViewDataSource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.menuItems.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"MenuCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    NSString *menuItem = self.menuItems[indexPath.row];
    NSString *menuIcon = self.menuIcons[indexPath.row];

    cell.textLabel.text = menuItem;
    cell.imageView.image = [UIImage imageNamed:menuIcon];
    [cell setBackgroundColor:[UIColor clearColor]];

    return cell;
}
user1172579
  • 575
  • 1
  • 7
  • 22
  • It looks like an alignment issue. Notice in your second image how part of the search bar is beneath the center view. Try adjusting anchorLeftPeekAmount and anchorLeftRevealAmount. – Neal Ehardt Mar 25 '14 at 18:12
  • Thx a lot Neal. I found the anchorLeftPeekAmount and anchorLeftRevealAmount are fine. So i reduce the width of the UITableView from 320 to 276 (anchorLeftPeekAmount default is 44). then it display correctly ! – user1172579 Mar 26 '14 at 02:48

1 Answers1

0

Thx a lot Neal. I found the anchorLeftPeekAmount and anchorLeftRevealAmount are fine. So i reduce the width of the UITableView from 320 to 276 (anchorLeftPeekAmount default is 44). then it display correctly !

user1172579
  • 575
  • 1
  • 7
  • 22