Using a Show Segue by clicking a selected cell, is there any way to set the bounds of the next view?

CharlieFinlaysonCharlieFinlayson ✭✭USUniversity ✭✭

The next view that get's launched by clicking on a cell in my UICollectionView takes up the whole screen. It does have a back button, which I like, but I want the view to appear within the bounds of a container way back in the hierarchy, so I can still see my custom nav bar and sidebar navigation panel.

I achieved this effect by pushing modally and setting the presentation to current context but then I had no back button and no NavigationController to add a back button to (I assume for not adding to the navigation stack).

Does anyone know how to set the bounds following a Show (push)?

Answers

  • SrimanSriman ✭✭ INMember ✭✭
        this.NavigationItem.SetLeftBarButtonItem (new UIBarButtonItem(
                        UIImage.FromFile("_ImageNameDoesnotPresentInResourceFolder.png_"), UIBarButtonItemStyle.Plain, (sender, args) => {                  
                            base.NavigationController.PopViewController(true);              
                        }), true);
    

    Add the above code in viewcontroller's ViewDidLoad. This hides the back button. But Navigation bar still viewable.

  • CharlieFinlaysonCharlieFinlayson ✭✭ USUniversity ✭✭

    No, I want to keep the back button. I just don't want a fullscreen view. I don't know if you understood my question

    "I want the view to appear within the bounds of a container way back in the hierarchy, so I can still see my custom nav bar and sidebar navigation panel."

Sign In or Register to comment.