ios - SWRevealViewController with StoryBoard with storyboard Identifier in Swift not segue how to do that -
swrevealviewcontroller how implements storyboard storyboard identifier in swift not segue please me
uistoryboard *storyboard = [uistoryboard storyboardwithname:@"storyboardnibname" bundle:nil]; tempviewcontroller *myvc = (tempviewcontroller *)[storyboard instantiateviewcontrollerwithidentifier:@"identifier"]; uiviewcontroller *frontviewcontroller = myvc; rearviewcontroller *rearviewcontroller = [[rearviewcontroller alloc] init]; uinavigationcontroller *frontnavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:frontviewcontroller]; uinavigationcontroller *rearnavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:rearviewcontroller]; swrevealviewcontroller *revealcontroller = [[swrevealviewcontroller alloc] initwithrearviewcontroller:rearnavigationcontroller frontviewcontroller:frontnavigationcontroller]; revealcontroller.delegate = self; self.viewcontroller = revealcontroller; self.window.rootviewcontroller = self.viewcontroller; [self.window makekeyandvisible];
swift:
let storyboard = uistoryboard(name: "main", bundle: nil) let vc = storyboard.instantiateviewcontrollerwithidentifier("target_view_controller") as! uiviewcontroller var rvc:swrevealviewcontroller = self.revealviewcontroller() swrevealviewcontroller rvc.pushfrontviewcontroller(vc, animated: true)
Comments
Post a Comment