Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

badgevalue disappears if I change viewcontroller using pushViewController #32

Open
tattva20 opened this issue Jan 7, 2017 · 1 comment

Comments

@tattva20
Copy link

tattva20 commented Jan 7, 2017

For some strange reason if I change from screen A to screen B using a slidemenu with the pushViewController instruction the badgeValue disappears, but if I turn off animations it stays there.

This is the method I'm using.

func openViewControllerBasedOnIdentifier(_ strIdentifier:String){
let destViewController : UIViewController = self.storyboard!.instantiateViewController(withIdentifier: strIdentifier)

let topViewController : UIViewController = self.navigationController!.topViewController!

if (topViewController.restorationIdentifier! == destViewController.restorationIdentifier!){
    print("Same VC")
} else {
    var numeroProductos = String(Carrito.numProd)

    self.navigationController!.pushViewController(destViewController, animated: true)


  }
}

If instead of using .pushViewController I perform a normal segue this doesn't happen, in either case I load the badgeValue again on viewDidLoad. Any ideas? I'm using swift 3.0

@ewavestech
Copy link

Same Problem to me also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants