2

I am terrible at understanding work with interface builder, so (probably dumb) question comes. I have created sliding view controller. When I click a cell, I want this controller slide back as it was. I used [self dismissViewControllerAnimated:YES completion:NULL];. It used to dismiss table view controller (when I did not use Sliding). However, not it throws me not to previous controller, but to login page (initial controller). Have a look at the picture.enter image description here

Hope this provides enough information. Sorry if it is not enough, as I am really bad with interface builder. I will add anything needed as requested. Thank you.

EDIT: I have also tried to drag (holding ctrl) from sliding controller and chose ECSlidingSegue. In such case there is nothing going on.

sermilion
  • 185
  • 1
  • 15

1 Answers1

1

Normal behavior of modal is when dismissed it shows its Parent Controller, in your case its I guess LoginViewController, form where you must have presented the TableViewController as modal.

However, if you wish to show a different controller other than the Parent, you can choose to push a new controller when come from TableViewController, or, you can achieve modal appearance with simple push of navigation controller, and I guess this would be easier and correct in your case.

So instead of presenting the TableViewController as modal, push it with Modal animation, and on selection of cell InboxViewController will be pushed.

There are few changes you need to do.

  1. Create a Custom Segue from LoginController to TableViewController.
  2. Create a push segue from TableViewController to InboxViewController.

I hope it helps.

Cheers.

iphonic
  • 12,615
  • 7
  • 60
  • 107
  • Hi, I have tried till now, but it does not work for me (. I think I am doing something wrong. As I said, I don't really understand IB. Is there a way to explain it a bit more detailed? I really appreciate your help. Thank you. – sermilion Jul 14 '14 at 12:48
  • Are you able to create Custom Segue, for the custom push animation, for help look here http://jrwren.wrenfam.com/blog/2012/02/01/storyboard-custom-segue-for-custom-pushviewcontroller-animation/ – iphonic Jul 14 '14 at 12:53
  • Yes, I have created custom segue right now. I can go to InboxViewController, but when I press "Menu" button, not the app crashes and gives error something like EXC_BAD_ACCESS (...). – sermilion Jul 14 '14 at 13:33
  • And the sliding view does not open coz of the crash. – sermilion Jul 14 '14 at 14:08