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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:56:04+00:00 2026-06-11T04:56:04+00:00

I have a normal Interace in interface builder (there’s a UILabel and a UIButton

  • 0

I have a normal Interace in interface builder (there’s a UILabel and a UIButton). In code, I create a UIScrollView with a (unknown) number of UILabels (depends by the User). These labels are created in - (void)viewWillAppear to make sure the data is up to date. To remove the labels, in viewWillDisappear i’m calling

for(UIView *subview in [scrollView  subviews])
{
    [subview removeFromSuperview];
}

The problem is, after the view get’s called again, the Objects created with interfacebuilder (the UILabel & UIButton) disappear. Do the get removed by calling [subview removeFromSuperview];? If yes, how to add them again? Everything which is created by code is still there…

  • 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-11T04:56:05+00:00Added an answer on June 11, 2026 at 4:56 am

    you should add tag to your labels that you add dynamically.

    for(int i = 0; i < n; i++){
      UILabel *label = [UILabel alloc...];
      label.tag = 999999;
    }
    

    then.

    for(UIView *subview in [scrollView  subviews])
    {
       if([subview isKindOfClass:[UILabel class]] && subview.tag == 999999){
        [subview removeFromSuperview];
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a normal asp.net page containing some code that I want to measure
Is it normal to have tests that are way bigger than the actual code
I have several NSComboBoxes created in Interface Builder, and one created programmatically. The NSComboBoxes
Is there a reason that the Silverlight Ready WCF does not have an Interface
I am trying to find out why when creating an UIButton in interface builder
I have a UIToolbar with a UIBarButtonItem that I created in Interface Builder. The
The UITextFields in my app have placeholder text defined (in Interface Builder), and I
I have normal sqlite database and want to use fts3. As mentioned in http://www.sqlite.org/fts3.html
I have a normal NavigationController. When i open one modalView (using segues) and dismiss
I have a normal textbox in my application. I can paste data to it

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.