I have created a
view controller in
iPhone app, which has a button. On
button click we open a UITableViewController, on this
table view we
populate data using a
mutable array and that array has several NSDictionary objects.
#import <UIKit/UIKit.h>
@interface MyTableViewController:UITableViewController
{
NSMutableArray *arrayList;
NSIndexPath *last;
IBOutlet UITableView *tableView;
NSObject *selectedItem;
}
@property(nonatomic, retain) NSArray *arrayList;
@property(nonatomic, retain) UITableView *tableView;
@property(nonatomic, retain) NSObject *selectedItem;
@end
this is the
Implementation of MyTableViewController.m
#import "MyTableViewController.h"
@implementation MyTableViewController
@synthesize arrayList, tableView, selectedItem;
Now, I have no
problem to open that table view on button click, but I
can not figure-out what are the
properties of the selected item.
You can use this method like this:
The Log message will display in the console on selection changes.
and implement didSelectRowAtIndexPath: method, it is a delegate method of table view in your view controller like this: