Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7986213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:47:30+00:00 2026-06-04T11:47:30+00:00

I have looked around the web for some time looking for any resources on

  • 0

I have looked around the web for some time looking for any resources on this topic and have come up with nothing that solves my dilemma.

I have a dialog view controller and its root is simply displaying a list of strings similar to how the iphone music song scrollable view is laid out. What I need is a subview located at the top of the screen and the scrollable DVC below it. I need to the top view to be always in view while the user can scroll through the root element because the top view will be holding statistics.

I have tried adding a subview but it simply overlaps the dvc below it, and I have not been able to figure out a way to add a dvc as a subview to a UIView.

Any help would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:47:31+00:00Added an answer on June 4, 2026 at 11:47 am

    What is needed to achieve this is a single root view controller that hosts two subview controllers. One subview contains the statistics at the top of the window. The bottom subview contains a navigation controller that holds the dialog view.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    
    using MonoTouch.Foundation;
    using MonoTouch.UIKit;
    using MonoTouch.Dialog;
    using System.Drawing;
    
    namespace delete201205203
    {
        [Register ("AppDelegate")]
        public partial class AppDelegate : UIApplicationDelegate
        {
            UIWindow window;
            MyUIViewController _mvc;
    
            public override bool FinishedLaunching (UIApplication app, NSDictionary options)
            {
                window = new UIWindow (UIScreen.MainScreen.Bounds);
    
                _mvc = new MyUIViewController ();
    
                window.RootViewController = _mvc;
                window.MakeKeyAndVisible ();
    
                return true;
            }
        }
    
        public class MyUIViewController : UIViewController
        {
            MyDialogViewController _dvc;
            UINavigationController _nav;
            StatisticsViewController _statistics;
    
            public override void ViewDidLoad ()
            {
                base.ViewDidLoad ();
    
                var root = new RootElement ("Root") {
                    new Section ("Section") {
                        new EntryElement ("caption", "placeholder", ""),
                        new RootElement ("Root 2") {
                            new Section ("Section") {
                                new EntryElement ("caption", "placeholder", ""),
                                new StringElement ("Back", () => {
                                    _nav.PopViewControllerAnimated (true);  
                                })
                            }
                        }
                    }
                };
    
                _dvc = new MyDialogViewController (root);
                _nav = new UINavigationController (_dvc);
                _nav.SetNavigationBarHidden (true, false);
                _nav.View.Frame = new RectangleF (0, 70f,
                                                  this.View.Bounds.Width, 
                                                  this.View.Bounds.Height -70f);
    
                _statistics = new StatisticsViewController ();
                _statistics.View.Frame = new RectangleF (0, 0,
                                                  this.View.Bounds.Width, 
                                                  70f);
    
                this.AddChildViewController (_nav);
                this.View.AddSubview (_nav.View);
    
                this.AddChildViewController (_statistics);
                this.View.AddSubview (_statistics.View);
            }
    
            public override void ViewWillLayoutSubviews ()
            {
                base.ViewWillLayoutSubviews ();
                _nav.View.Frame = new RectangleF (0, 70f,
                                                  this.View.Bounds.Width, 
                                                  this.View.Bounds.Height -70f);
    
                _statistics.View.Frame = new RectangleF (0, 0,
                                                  this.View.Bounds.Width, 
                                                  70f);
            }
    
            public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
            {
                return true;
            }
        }
    
        public class StatisticsViewController : UIViewController
        {
            UILabel _label;
            public override void ViewDidLoad ()
            {
                base.ViewDidLoad ();
                this.View.BackgroundColor = UIColor.White;
    
                _label = new UILabel (new RectangleF (this.View.Bounds.Width * .5f - 50f,
                                                      this.View.Bounds.Height * .5f -10f,
                                                      100f, 20f));
                _label.AutoresizingMask = UIViewAutoresizing.FlexibleMargins;
    
                _label.Text = "statistics";
                this.View.AddSubview (_label);
    
            }
    
            public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
            {
                return true;
            }
        }
    
        // This overrde is needed to ensure the pop view animation  
        // works correctly in landscape mode
        public class MyDialogViewController : DialogViewController
        {
            public MyDialogViewController (RootElement root) : base (root) {}
            public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
            {
                return true;
            }   
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked around SO and the web for quite some time now and
I have looked around but cannot find anything that answered this particular question related
Sorry if this is obvious but have looked around and can't get this working:
I've been looking around and I'm starting to worry that this isn't possible. Is
Ok I have been working on this feature for some time now and it
I have looked around on the web and have found a code to redirect
I looked around and didn't find exactly what I'm looking for. I have a
After some searching around the web I want to seek your opinion on this
Ok, I have looked around and could not find a solution to this problem.
I have looked all around and only found solutions for python 2.6 and earlier,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.