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 8429325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:18:17+00:00 2026-06-10T05:18:17+00:00

I have a UIViewController class SurveyPanel that inherits from UIViewController like so SurveyPanel :

  • 0

I have a UIViewController class SurveyPanel that inherits from UIViewController like so

SurveyPanel : UIViewController

Then I have another UIViewController class called AnnouncementPanel that inherits from SurveyPanel

AnnouncementPanel : SurveyPanel

I need AnnouncementPanel to display both buttons from SurveyPanel and buttons specific to AnnouncementPanel, but currently it will only display components within SurveyPanel.
Could it be the way I load the controllers in my AppDelegate.cs?
Currently I’m doing:

window = new UIWindow(UIScreen.MainScreenBounds);
AnnouncementPanel viewController = new AnnouncementPanel();
window.RootViewController = viewController;
window.MakeKeyAndVisible();
return true;
  • 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-10T05:18:18+00:00Added an answer on June 10, 2026 at 5:18 am

    Do you create UI in views by loading XIB files or by code?

    If “by loading XIB files”, it’s a bit messy to use prepared UI with UIViewController inheritance.

    If “by code”, please double check that you:

    1. Create controls, which are belong to AnnouncementPanel;
    2. Call AddSubview to add controls to AnnouncementPanel.View;
    3. Set up controls frames correctly (in visible part of screen);
    4. Call base (i.e. SurveyPanel) controls creation.

    Example, which I use for inheritance of (UITableViewCells) views:

    // Base cell
    public class UserCell: UIViewController
    {
    
        string cellId = "CustomCell2";
        UITableViewCell cell;
        public UITableViewCell Cell {
            get { 
                if (cell == null)
                    cell = new UITableViewCell (UITableViewCellStyle.Default, cellId);
                return cell; }
        }
    
        protected UIImageViewAvatar IvaAvatar;
        protected UILabel LblPerson;
    
        ...
    
        public UserCell (string cellId)
        {
            this.cellId = cellId;
    
            IvaAvatar = new UIImageViewAvatar ();
            LblPerson = new UILabel ();
    
            Cell.AddSubview (IvaAvatar);
            Cell.AddSubview (LblPerson);
        }
    
        ...
    
    }
    
    // Inherited cell
    public class MessageCell: UserCell
    {
        protected UILabel LblText;
        protected UILabel LblDatePlace;
    
        Message message;
        public Message Message {
            get { return message; } 
            set {
                message = value;
                Render ();
            }
        }
    
        ...
    
        // 4.
        // It is important to call base constructor
        public MessageCell (string cellId): base(cellId)
        {
            // 1.
            LblText = new UILabel ();
            LblDatePlace = new UILabel ();
    
            // 2.
            // Adding more controls to (Cell) View
            Cell.AddSubview (LblText);
            Cell.AddSubview (LblDatePlace);
        }
    
        ...
    
        // 3.
                // Render is called when someone set up Message property
        // So frames will be changed according to new data
        public new void Render()
        {
            base.Render();
    
            // Text
            LblText.Text = Message.Text;
            LblText.Font = UIFont.SystemFontOfSize (Constants.FONT_SIZE_MESSAGE);
    
            LblText.LineBreakMode = UILineBreakMode.WordWrap;
            LblText.Lines = 0;
            LblText.Frame = new RectangleF (LblPerson.Frame.Left, LblPerson.Frame.Bottom //+ Constants.SIZE_IDENT*/
                                            ,
                                            Cell.Frame.Width - LblPerson.Frame.Left - Constants.SIZE_IDENT, 0);
            LblText.SizeToFit ();
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController Class Aplha that calls another UIViewController Class Beta in a
I have a class A, and B like these: @interface A : UIViewController <UITableViewDelegate,
I have a UIViewController class MyClass that initially had no XIB, and was initialized
I have a UIViewController that presents another UIViewController with a picker and returns four
i have a UIViewController class that do the following: detect movement. array a bunch
I have a custom UIViewController class that contains my similar methods and UI components
I have a class that subclasses UIView called DrawView. This class contains custom drawing
I have a UIViewController class where I create a UIView instance. And then I
I have created a UIViewController class called MyViewController with a UIImageView in its XIB
I have an Advertisement UIViewController class that contains the following code. The frame is

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.