문제

I have a UITableView with some Cells. I don't use NavigationController, so I'd like to use UIModalTransition to Switch from RootController, my TableViewcell, to my DetailView, but want to add a Navigation bar to attribute some actions, like Backbutton. I don't want to use seguesTransition, I only used XIB File and any Storyboard.

I really don't know how to use the Modal Transition in TableView, anyone know how i can do it ?

Thanks.

도움이 되었습니까?

해결책

have you tried

    [self presentModalViewController:yourViewController animated:YES];

then you can set certain styles for transitions in it.

On the other view add a navigationbar and place a backbarbuttonitem and add an action to it to go back to your previous view.

Although why do you want to do it is unclear to me. if you dont want a navigation controller on the first view, you can just set it to hidden.

    self.navigationController.navigationBar.hidden = YES;

and then in the viewDidLoad of other view you can do the reverse i.e

    self.navigationController.navigationBar.hidden = NO;

this is quite an easy way of achieving what you want with relatively less amount of code!!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top