objective c - Failed to push to a View Controller in iOS -


I am beginning a lot for iOS development. I have created a navigation application in iOS, when some visible table views can be viewed in another view on the cell tap. I had the following code,

  - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath {LawyerViewController * DVC = [self.storyboard instantiateViewControllerWithIdentifier: @ "LawyerViewController"]; NSLog (@ "% @", [self object object: index: indexpath.ro]); Dvc.lawyer = [self.myObject objectAtIndex: indexPath.row]; [Self. Navigation Controller Push ViewController: Animated Dcc: Yes]; }  

It's going to the next scene. But do not tap here dvc.lawyer see the next page.

Reading the value in the next page

  NSLog (@ "% @", self.lawyer.firstName);  

Enter image details here

How to I can fix it in advance.

Thank you! Text after "

You are about to illustrate ViewControllers. In other ways, if you use storyboard segues (UIStoryboardSegue *) segue this: (id) this {- (minus) prepareForSegue

 : you  prepareForSegue  if you need to apply where you can use this kind of segues destinationViewController ([[Segue identifier] isEqualToString: @ "YOUR_SEGUE_NAME_HERE"]) {// Destination View Controller LawyerViewController Reference * VC = [segue destinationViewController]; // Pass any data vc.lawyer = self.myObject [[self.tableView indexPathfores selected rAW] .OO]; // not tested}}  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -