How to hide master view in UiSplitviewcontroller in ipad

后端 未结 9 1593
野的像风
野的像风 2020-12-08 10:44

Is there is any way to hide the master view in a splitviewcontroller programmatically. In my application the first screen will be of a splitviewcontroller, i don\'t need any

9条回答
  •  盖世英雄少女心
    2020-12-08 11:00

    Same as answer from Jack but a one liner. Past into - (void)setDetailItem:(id)newDetailItem { ... } to dismiss the master.

    [[UIApplication sharedApplication] sendAction: self.navigationItem.leftBarButtonItem.action
                                               to: self.navigationItem.leftBarButtonItem.target
                                             from: nil
                                         forEvent: nil];
    

提交回复
热议问题