0

I am using alertcontroller with indicator in FirstViewController, and I use self.dismissViewControllerAnimate to dismiss it. Then in SecondViewController I use popViewController to return to FirstViewController but I can't go back to FirstViewController, although the alertcontroller is being loaded and dismissed.

When I tried to remove the alertcontroller, I was able to return to FirstViewController. But that's not the requirement.

Viral Savaj
  • 3,379
  • 1
  • 26
  • 39
FH-
  • 133
  • 1
  • 9
  • 1
    try `self.removeFromParentViewController()` in place of `self.dismissViewControllerAnimate`, but if you show your code is better to understand your issue! – ViTUu Sep 09 '15 at 13:35
  • i dont know how to paste my code here. but here it is: let indicator = UIActivityIndicatorView() pending.view.addSubview(indicator) indicator.color = UIColor.grayColor() pending.view.addConstraints(constraints) indicator.startAnimating() var v: UIViewController = UIViewController() v.preferredContentSize = CGRectMake(83,0,100,60).size pending.setValue(v, forKey: "contentViewController") self.presentViewController(pending, animated: true, completion: nil) to dismiss it i use self.dismissViewControllerAnimated(true, completion: nil) – FH- Sep 09 '15 at 13:41
  • @ViTUu self.removeFromFromParentController doesnt dismiss the uialertcontroller. – FH- Sep 09 '15 at 13:45

0 Answers0