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

On presentation mode i want to show VC using ButtonRow, but i have only nibs, there is no storyBoard. #1162

Closed
ghost opened this issue Jul 21, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2017

On presentation mode i want to show VC using ButtonRow, but i have only nibs, there is no storyBoard.
I have nib and its class. Which mode and how can i use it to present VC.

<<< ButtonRow("Photo settings") { (row: ButtonRow) in
                row.title = row.tag
                row.presentationMode = .show(controllerProvider: .nibFile(name: "PhotoSettingsVC", bundle: nil), onDismiss: nil)
            }

it crashes app

@mtnbarreto
Copy link
Member

Hi! I'm willing to help but please follow as much as possible contribution guidelines so anyone can give support to you without doing unnecessary effort.

@ghost
Copy link
Author

ghost commented Jul 22, 2017

OK.
form +++ Section("")
<<< ButtonRow("Photo settings") { (row: ButtonRow) in
row.title = row.tag
row.presentationMode = .show(controllerProvider: .nibFile(name: "PhotoSettingsVC", bundle: nil), onDismiss: nil)
}
<<< ButtonRow("Theme settings") { (row: ButtonRow) in
row.title = row.tag
// row.presentationMode = .segueName(segueName: "AccesoryViewControllerSegue", onDismiss: nil)
}

This is my code. I used button row with presentation mode to show other viewcontroller with xib file(there is no storyboard, there is no segue).
Question is, how i can(or which method i can use) show or push viewcontroller without segue(or storyboard)?

@chanonly123
Copy link

<<< ButtonRow("Change Email") {
$0.title = $0.tag
$0.presentationMode = .show(controllerProvider: .callback(builder: {
let yourViewController = // instantiate viewController
return yourViewController
}), onDismiss:nil)

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

No branches or pull requests

3 participants