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.sstatic.net/Og5Nb.jpg
https://i.sstatic.net/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;
}
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 !