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

How to move another viewcontroller when button is tapped ? #44

Open
IOSDeveloperProgrammer opened this issue Oct 23, 2017 · 1 comment
Labels

Comments

@IOSDeveloperProgrammer
Copy link

`func circleMenu(_ circleMenu: CircleMenu, buttonDidSelected button: UIButton, atIndex: Int) {
print("button did selected: (atIndex)")

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let annoucement = storyboard.instantiateViewController(withIdentifier: "FirstVC") as! FirstVC

}`

This method is not working. please guide me

@tache
Copy link
Contributor

tache commented Jan 4, 2018

In Xcode IB, make sure you setup a segue ... You could set it up programmatically as well.

ensure you have the delegates set ...

extension MyViewController: CircleMenuDelegate { ... }

then in you delegate for buttonDidSelected ...

func circleMenu(_ circleMenu: CircleMenu, buttonDidSelected button: UIButton, atIndex: Int) {

switch atIndex {

        case 0:
            self.performSegue(withIdentifier: "MyNewWindowSegue", sender: nil)

...
... }

@0ber 0ber added the question label Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants