hide child view after few seconds
I set time for that but i cant access child viewcontroller in my timer function
I tried dissmiss , removefromparent about not worked.
only self.view.isHidden = true is worked
I can't place it in timer
My Parent view
Child View:




In
Like_btn_Action()function, you:LikeViewControllerand then the function exits. At this point, you no longer have a reference to your instance of
LikeViewController...likeVChas gone out of scope.You need to use a class-level var to maintain the reference to the loaded child view controller, along these lines:
Then, when you want to remove the view you added, you can "get to it" via:
for example.