I create a new UITableviewcell.swift
from UITableView
, and I want to use alert button to push UITableView
to other view.
I try to use some method of instantiateViewController
as below:
let sb: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "MyViewController")
and I try:
self.navigationController?.pushViewController
(uitableviewcell has no member navigationController)- as above, use
self.window?.rootViewController?
to replaceSelf
,but it's useless (myRootView
isSWRevealViewController
)
How can I do that?
This may be help for you