I have a slide menu from the right that I would like to customize to have icons rather than text labels.
I have SlideNavigationController.m and SlideNavigationController.h
In MenuViewController.h I have:
#import <UIKit/UIKit.h>
#import "SlideNavigationController.h"
@interface MenuViewController : UIViewController <UITableViewDelegate>
@property (nonatomic, strong) NSString *cellIdentifier;
@end
In MenuViewController.m I have:
#import "MenuViewController.h"
@implementation MenuViewController
@synthesize cellIdentifier;
#pragma mark - UITableView Delegate & Datasrouce -
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection (NSInteger)section
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:self.cellIdentifier];
switch (indexPath.row)
{
case 0:
cell.imageView.image = [UIImage imageNamed:@"Maps-icon.png"];
break;
case 1:
cell.textLabel.text = @"Yellow";
break;
case 2:
cell.textLabel.text = @"Orange";
break;
}
return cell;
}
For each case (for example, case 0: cell.imageView.image = [UIImage imageNamed:@"Maps-icon.png"]; I want to place image on the far right side of the cell since this is what displays on the slide animation. How do I change the position of the image?
Thanks in advance.