I am trying to create an application which makes iPhone act as a pendrive to share all types of files.
Initially i have some files(jpg, png, pdf, zip) in a folder in my mac. I need to display those files in a table view in the simulator. I am using NSMutableArray to hold those files. But i dont know how to display that mutable array to the table view.
Please help me. Thanks in advance
Basically there are 3 of the UITableViewDataSource methods you need
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
This is where you can put data into the cell i.e: “cell.textLabel.text = [array objectAtIndex:indexPath.row]”
(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
Tells the tableview the sections in the table i.e 1
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
Number of rows in that section – i.e: [array count];