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
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)
Most helpful comment
<<< ButtonRow("Change Email") {
$0.title = $0.tag
$0.presentationMode = .show(controllerProvider: .callback(builder: {
let yourViewController = // instantiate viewController
return yourViewController
}), onDismiss:nil)