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

Created on 21 Jul 2017  路  3Comments  路  Source: xmartlabs/Eureka

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

awaiting response

Most helpful comment

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

All 3 comments

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.

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)?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fpena picture fpena  路  3Comments

s1rc picture s1rc  路  3Comments

jaylyerly picture jaylyerly  路  3Comments

tomasKa picture tomasKa  路  4Comments

pteasima picture pteasima  路  3Comments