How to Hide MasterView in UISplitViewController in iOS

83 views Asked by At

when I touched the webview that is already added in detailview, i would like to hide master view in landscape

I am using Xamarin.iOS with C#, but i couldnt do that..

https://forums.xamarin.com/discussion/3578/uisplitview-comes-up-in-landscape-with-master-view-hidden

i followed here.. But it didnt help me..

How to hide-show when I touch the screen of detailview..

1

There are 1 answers

0
Mitul Marsoniya On

Add this method AppDelegate.m and user when you need detialView diplay.

-(void)setDetailView:(int)num ListofArray :(NSArray *)arr didSelectViewController:(UIViewController *)viewController diffClassId:(NSString *)strId
    {
        if ([viewController isKindOfClass:[DetailViewController class]])
        {
            DetailViewController *viewDetail = [[DetailViewController alloc] initWithArticle:num inArticlesArray:arr];
            viewDetail.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem;
            viewDetail.navigationItem.leftItemsSupplementBackButton = NO;

            detailNav=[[UINavigationController alloc]initWithRootViewController:viewDetail];
            //detailNav=[detailNav initWithRootViewController:viewDetail];

            NSArray *viewControllers = [[NSArray alloc] initWithObjects:mainNavController, detailNav, nil];
            splitViewController.viewControllers=viewControllers;
    }