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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:29:02+00:00 2026-05-22T23:29:02+00:00

i create views in viewDidLoad,such as UIScrollView* scrollViewright = [[UIScrollView alloc] initWithFrame:CGRectMake(0,0,400,768)]; [scrollViewright setContentSize:CGSizeMake(400,1000)];

  • 0

i create views in viewDidLoad,such as

UIScrollView* scrollViewright = [[UIScrollView alloc] initWithFrame:CGRectMake(0,0,400,768)];
[scrollViewright setContentSize:CGSizeMake(400,1000)];
[self.view addSubview:scrollViewright];

so,how can i release them?

i use [scrollViewright release]; in ‘- (void)dealloc’ and self.scrollViewright = nil in ‘-(void)viewDidUnload’,both of them tell me wrong ,so can anybody help me?

  • 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-22T23:29:03+00:00Added an answer on May 22, 2026 at 11:29 pm

    Well you have two kinds of release that can be done:

    UIScrollView* scrollViewright = [[UIScrollView alloc] initWithFrame:CGRectMake(0,0,400,768)];
    [scrollViewright setContentSize:CGSizeMake(400,1000)];
    [self.view addSubview:scrollViewright];
    [scrollViewright release];
    

    And the next one, when you want to remove the scrollView from the main view:

    [scrollViewright removeFromSuperview];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've create a subview using following code: -(void) viewDidLoad { CGRect subviewRect = CGRectMake(0,
- (void)viewDidLoad { UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapDetected:)]; tapGesture.numberOfTapsRequired = 1; tapGesture.numberOfTouchesRequired
This question discusses how to create gaps between views in a UIScrollView. The agreed
I would like to create views, similar to MVC, whereas I can plug HTML
I've got a (SQL Server 2005) database where I'd like to create views on-the-fly.
Ideally I'd like to be able to create the views in Interface Builder and
We are investigating how to create data entry views from a dynamic list of
I wanted to create a very simple method that switches between views in a
In my django views i have the following def create(request): query=header.objects.filter(id=a)[0] a=query.criteria_set.all() logging.debug(a.details) I
I want to create a FlipPanel, which provides two different views of the same

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.