0

this is my code:

   let swswipe:SWRevealViewController=UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("swswipe") as! SWRevealViewController
        if(indexPath.row==0)
        {

           let swipe=swipeView()
            swipe.collectionClick="one"
            self.presentViewController(swswipe, animated: true, completion: nil)

        }



            front
              |
1st view <->swreveal<->2ndview(swipe)

i am trying to sent values from 1st to 2nd but intermediate there is a swrevealview controller is there ,so that value didn't receive

but i didn't receive anything

 print("coming to collection view", self.collectionClick)
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47

1 Answers1

0

You can do this in any of following ways:

  • Send a notification when the second controller is going away and have the parent listen for it.

  • Create a delegate protocol that lets the second controller reference a parent method directly.

  • (If that needs to implement over the back button action)Use the parent's viewWillAppear: and check the isMovingToParentViewController property for whether it's just re-appearing.

and apply what is best for your value passing conditions and availability of values.

MobileGeek
  • 2,462
  • 1
  • 26
  • 46