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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:04:01+00:00 2026-05-15T20:04:01+00:00

So, i have a view controller which contains just a scroll view. In viewDidLoad,

  • 0

So, i have a view controller which contains just a scroll view. In viewDidLoad, i add a view to it from a nib, but when i do that, the scrolling stops working. The view i added works though, i.e. i can click buttons, but half of it is off screen.

@implementation JCEKScrollViewController_iPhone
@synthesize scrollView;
- (void)viewDidLoad {
    scrollView.backgroundColor = [UIColor redColor];
    scrollView.delegate = self;

    NSArray *nibParts = [[NSBundle mainBundle] loadNibNamed:@"JCEKKeyboard" 
                                                  owner:self 
                                                options:nil];
//first object is the view
    UIView *keyboard = [nibParts objectAtIndex:0];


    scrollView.contentSize = CGSizeMake(1000, 320);
    [scrollView setAutoresizesSubviews:YES];
    [scrollView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];

    [keyboard setAutoresizesSubviews:YES];
    [keyboard setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];


    [scrollView addSubview:keyboard];


}

Thanks

  • 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-15T20:04:02+00:00Added an answer on May 15, 2026 at 8:04 pm

    “This is for iPhone, no document views exist” – so you don’t have anything to display? Why to scroll an empty rectangle?
    Apple says “After initializing the NSScrollView instance you must, at a minimum, set the document view using the method setDocumentView: …”. They use (Listing 1) [scrollView setDocumentView:theImageView]; and theImageView there is a NSImageView. There is nothing like a NSDocumentView.
    Let me have one guess: you don’t use the “real” MVC-pattern. What you are doing is having a VC-Object and a Model or just one single object for everything. Right? If so: you miss to find out the “pure art”.
    No, you must not split this three parts all the time. It’s ok to combine two or even all three parts of the MVC-pattern. But before that you should do these small steps! Find out, how this should work. Here you will learn …
    • a model ist just fot to have all the data for one job together. It’s a little (but not at all) like some document file (and that’s not .doc), just without file.
    • the view is just one(!) way (maybe the only you have, but there can be as much as you want or need) to display some or all of the data, you want to show
    • the controller manages them: it fetches data from the model(s) and puts them back; it holds the view(s) and tells them, what to do – and maybe gets data from them (some to be pushed to a model or some for other needs – this is a logical or, a “||” and not the xor, people use in natural speech!)

    Sorry for my bad english. I wrote that just to make you curious. Just do an “RTFM”, or, in this circumstands, read the related parts of the developer documentation. For example http://developer.apple.com/iphone/library/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html could be a place to start with!

    Greetings

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

Sidebar

Related Questions

i have view controller which contains a button which show the image library ,if
I have a table view controller which doesn't let me manually scroll to the
I have a UIScrollView which contains a view controller which contains a couple of
I have a scroll view which contains several objects like text fields,labels,switch etc..Now as
I have a view controller that contains a table view, the items in the
I have a view setup in Interface Builder which contains a viewController that loads
Ok, so here's the situation. I currently have a view controller called MainViewController which
I have a Controller which returns a ViewModel to a View and it works
I have a navigation controller which also has a table view. I want to
Hi guys i have controller which returns a partial view, the controller is called

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.