Newbie here programming my first app (having made several tutorial apps). I am using a view controller called 'RootViewController' as a navigation controller. I have successfully pushed another view controller on top of this called 'ClientListViewController' using the command:
[self.navigationController pushViewController:clientListViewController animated:YES];
I am now in the ClientListViewController and trying to push another view controller onto the stack called 'AddClientViewController'. I would like to make this a modal view controller in the form of a UIModalPresentationFormSheet. I am trying to use a variation of the command above to push the new view controller but i don't know how to replace the 'self'. I have tried:
[RootViewController.navigationController pushViewController:AddClientViewController animated:YES];
and...
[[RootViewController navigationController] pushViewController:AddClientViewController animated:YES];
as well as each of these combinations using small 'R's for the word Root. Still no luck.
For clarity, I have used the following code at the top of my implementation file.
#import "AddClientViewController.h"
Am I approaching this in the right way, or should I be using a brand new navigation controller to add it to?
Any pointers greatly received.
Many thanks