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

  • Home
  • SEARCH
  • 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 7640175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:36:20+00:00 2026-05-31T08:36:20+00:00

At the moment I have a UIViewController subclass with a UIScrollView and a UIView

  • 0

At the moment I have a UIViewController subclass with a UIScrollView and a UIView inside of it. Below is a snippet of code from the class:

.h

#import <UIKit/UIKit.h>

@interface Scroller : UIViewController <UIScrollViewDelegate>
{
    UIScrollView *scrollView;
    UIView *testView;
}

@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;
@property (retain, nonatomic) IBOutlet UIView *testView;

@end

Inside the IB I link the UIScrollview to my variable, but when I get to the .m and try setting my scrollview contentSize it shows the scrollView as being nil.

.m

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    // Initialize of scrollView
    scrollView.contentSize = CGSizeMake(500, 500);
    scrollView.delegate = self;
}

Am I missing an import or anything to get this to be properly allocated?

Edit
It may help to know, but if I try to debug the issue and in the lldb check the value of scrollView I get a EXC_BAD_ACCESS error if I try to continue in the code.

  • 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-31T08:36:21+00:00Added an answer on May 31, 2026 at 8:36 am

    The issue wasn’t related to the code, but the debugger itself. I tried doing this in xCode 4.3.1 and was debugging through the application and saw that the proper fields weren’t being set both in the xib and in the code. I deleted everything and opened up xCode 4.2 and tried in there and everything worked nicely. After testing in 4.2 I moved to 4.3.1 where it asked me to switch from the GDB to the LLDB. I guess it was just paranoia on my end for not seeing proper results showing up.

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

Sidebar

Related Questions

At the moment I have listings enabled(see code below) which means everyfolder is affected.
At the moment I have a combobox that is populated from the name fields
At the moment I have the following code which works fine. label = new
At the moment I have this Code (Deepth = 2 Categories) private void Window_Loaded(object
At the moment I have this (standard) code which gives me a full-width background
At the moment I have the following Command class: Public Class SubscribeCommand Implements ICommand
I have differents UIViewController that contains components that appear and disappear from the view
At the moment I have a PHP/HTML select box that is created dynamically from
I have a UIViewController which has a retainCount of 3 the moment I instantiate
From the moment I have faced Python, the only thing I can say for

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.