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

Trouble getting the cube navigation control working in Swift #21

Closed
pktrkts opened this issue Nov 1, 2016 · 1 comment
Closed

Trouble getting the cube navigation control working in Swift #21

pktrkts opened this issue Nov 1, 2016 · 1 comment

Comments

@pktrkts
Copy link

pktrkts commented Nov 1, 2016

Hi,

I've implemented your cube navigation controller just like in the demo. It seems like the software is written so it will be used throughout the software, not just in a portion of the software- is this correct? In the AppDelegate file I have:

var navigationController: CubeNavigationController!

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
    loadData()
    let myViewController = ViewController(nibName: "ViewController", bundle: nil)
    navigationController = CubeNavigationController(rootViewController: myViewController)
    return true
}

Then in the initial viewcontroller I have:

@IBAction func segueToCreateNew(_ sender: UIButton)
{
var createNewAccountViewController = NewAccountCreationViewController(nibName: "NewAccountCreationViewController", bundle: nil)
self.navigationController?.pushViewController(createNewAccountViewController, animated: true)
}

This doesn't seem to work. What am I doing wrong?

Thanks,
Sean

@andresbrun
Copy link
Owner

andresbrun commented Nov 3, 2016

Hi pktrkts,

what exactly doesn't work? the animation is the default one? Or the viewcontroller doesn't even appear?

the only thing I see wrong in your piece of code is that you are not setting the

self.windows.rootViewController = CubeNavigationController(rootViewController: myViewController)
self.window.makeKeyAndVisible()

@pktrkts pktrkts closed this as completed Apr 20, 2017
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