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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:48:10+00:00 2026-05-28T02:48:10+00:00

May be it will a stupid for someone but i need the solution of

  • 0

May be it will a stupid for someone but i need the solution of this problem.I want to add a view controller on another view controller.If I explain it then,

  1. My main view controller is containing a uitableview.
  2. My another view controller containing a scrollview of buttons.

Now I want to set my scrollview controller at the top of the my main view controller [which is taking uitableview]. Thats mean [mainview addsubview:scrollview controller]

NOTE THAT: My scrollview is a view controller which is taking scrollview of some buttons.

If somebody give any example or source code or link of tutorial on these problem then it will very much helpful for me.

Thanks In advance.

EDIT:

Till now i have done…

In .h file

#import "scrollViewButtons.h"
scrollViewButtons *scrollButtonView;
@property (nonatomic,retain) scrollViewButtons *scrollButtonView;

In .m file

@synthesize scrollButtonView;

In viewDidLoad

scrollButtonView = [[scrollViewButtons alloc] initWithNibName:@"scrollViewButtons" bundle:nil];
CGRect frame = CGRectMake(0, 0, 320, 43);
scrollButtonView.view.frame = frame;
scrollButtonView.view.userInteractionEnabled =YES;
[self.view addSubview:scrollButtonView.view];   

Now i can see the scrollButtonView in my main view but i can not find any user interaction.I can not scroll the scrollview of buttons.Can anybody tell me why i am not being able to interact with that scrollButtonView?

  • 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-05-28T02:48:10+00:00Added an answer on May 28, 2026 at 2:48 am

    You are confusing views with view controllers. Apparently you have two views that have separate view controllers and you and you want these views to appear inside another view. That’s very easy to do.

    If you have a view controller, such as firstVC, then you can add the view that it controls by adding that view to another view, such as bigView. just use

    [bigView addSubview:firstVC.view];
    

    If you have a second view controller, such as secondVC, then you can add the view that it controls by adding that view to the another view, bigView. just use

    [bigView addSubview:secondVC.view];
    

    Now you only need to manage the view bigView with a view controller.

    You can vary this, depending on your level of understanding and the level of complexity or simplification you want to have. Most view controllers managed several UIViews — like labels, buttons, text fields, and other views. However, you may instantiate a second view controller (secondVC) inside the first view controller (firstVC) and then add the view of secondVC into the view of firstVC, like this:

    [firstVC.view addSubView:secondVC.view];
    

    I hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a stupid question for some of you but I need to
Ok...I am new to rails so this may be a stupid question but need
This may be a painfully simply question for which I will be mocked but
Okay, so this one may be difficult but I will do my best to
The question may sound a bit naive or stupid, but i was wondering...will POST
This may be a stupid question but is it possible to store a count
This may be a stupid question but one that is throwing me for a
This may be a pretty naive and stupid question, but I'm going to ask
This may seem like a basic/stupid/obviously-answered question, but I wanted to check: why use
This may turn out to be an embarrassingly stupid question, but better than potentially

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.