Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sagarshivam

macrumors member
Original poster
May 24, 2011
51
0
Dear All

Using the below code, i tried making one table view containing three dif cell elements. Also 'disclosure' is embedded. Now on tapping the row or tapping the disclosure, i want to navigate to another uitable view containing cell sub-elements. How this can be done? Also back and next button is required.
plz help me. I can think of the logic but unable to implement it. Kindly help me through sample code.

Thanks
Sagar
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
1) You have not posted "the below code"

2) Look at the documentation and Apple provided examples for UINavigationController.
 

sagarshivam

macrumors member
Original poster
May 24, 2011
51
0
Hi

I tried working with UINavigation controller but problem is that I want to push the new view as sliding., but in my case it just overlaps with the previous view.
So on tapping cell content of one table, another table view come but not as sliding but as overlapping.

Meanwhile, Is it possible for a table view to divide into two parts such that, left part is list of projects in tree structure and right side contains the list of files corresponding to the projects tapped in left part. Plz guide me how to implement this.


Thanks
 

ViviUO

macrumors 6502
Jul 4, 2009
307
22
If I understand you correctly from your first post, you do it in the didSelectRowAtindexPath method of your table view. Allocate the new table view (or views) you want to push, first. Maybe something similar to this:

Code:
- (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath
{

	YourTableViewController *yourTableViewConroller = [[YourTableViewController alloc] initWithNibName:@"YourTableViewController" bundle:nil];   
	YourTableViewController2*yourTableViewConroller2 = [[YourTableViewController2 alloc] initWithNibName:@"YourTableViewController2" bundle:nil];
	YourTableViewController3 *yourTableViewConroller3 = [[YourTableViewController3 alloc] initWithNibName:@"YourTableViewController3" bundle:nil];

    
	if (indexPath.section == 0 && indexPath.row == 0) {
		[self.navigationController pushViewController:yourTableViewController animated:YES];
	} else if (indexPath.section == 1 && indexPath.row == 0) {
		[self.navigationController pushViewController:yourTableViewController2 animated:YES];
	} else if (indexPath.section == 2 && indePath.row == 0) {
		[self.navigationController pushViewController:yourTableViewController3 animated:YES];
	} else {
		NSLog(@"Error");
	}

}

This code assumes your main table view has 3 sections with 1 row each.

You can probably alter it to fit your needs. Of course, there is probably a more elegant way than this to achieve what you need to do.

Also, sorry for any errors. I typed this up on my 12 in PB with a Chihuaua on my lap.

EDIT: Forgot about the bundle while alloc/init 'ing the view controllers, fixed.
 
Last edited:

sagarshivam

macrumors member
Original poster
May 24, 2011
51
0
Thanks a lot!! It worked. :)

Is it possible for a table view to divide into two parts such that, left part is list of projects in tree structure and right side contains the list of files corresponding to the projects tapped in left part. Plz guide me how to implement this? Will customizing the tableview work?
 

ViviUO

macrumors 6502
Jul 4, 2009
307
22
Thanks a lot!! It worked. :)

Is it possible for a table view to divide into two parts such that, left part is list of projects in tree structure and right side contains the list of files corresponding to the projects tapped in left part. Plz guide me how to implement this? Will customizing the tableview work?

Not on the iphone. Your best bet would be to take a look at split view controllers for the ipad.
 

sagarshivam

macrumors member
Original poster
May 24, 2011
51
0
Thanks a lot!!
I am just trying your way.

I am done with one small application in xcode. I have access to ipad. How is it possible to install .app from xcode to ipad?

I searched over the internet and found few ways but all are too confusing.
Even I found some $99 certification.

Plz let me know how to do it without going for this certification.

Thanks
 

ViviUO

macrumors 6502
Jul 4, 2009
307
22
You need to be a registered developer with Apple to install on devices, which costs $99.

However you could just use the ipad simulator.
 

sagarshivam

macrumors member
Original poster
May 24, 2011
51
0
Thanks for the info. I am just planning to go for $99 program.

Now when I am done with the GUI part of my iphone/ipad application, I want to authenticate (suer id and password), populate the tables with data from remote server and updating as well. How is is possible to connect the application with remote mysql database.

I have already made web-app that communicates with those databases but now I want to the communication between xcode app and those mysql db.

Plz help me
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.