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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:40:18+00:00 2026-05-13T12:40:18+00:00

I have a viewController that has a tableView and a custom loading UIView that

  • 0

I have a viewController that has a tableView and a custom loading UIView that displays a loading message and spinner while the data of the tableView is being loaded.
The custom UIView has a red background that i can see, but i can still see the lines of the tableView, How can i get to display the custom uiview without seeing the tableView lines on the background.

@implementation LoadingView

@synthesize spinner;

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
        [self setUserInteractionEnabled:NO];
        [self setBackgroundColor:[UIColor blueColor]];

        // Spinner
        spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        [spinner setCenter:CGPointMake(320/2, 150)];
        [self addSubview:spinner];
        [spinner startAnimating];

        //title label
        UILabel *titleLabel = [[UILabel alloc] init];
        titleLabel.text = @"Loading...";
        titleLabel.font = [UIFont boldSystemFontOfSize:18];
        titleLabel.lineBreakMode =  UILineBreakModeWordWrap;
        titleLabel.backgroundColor = [UIColor clearColor];
        titleLabel.textColor = [UIColor blackColor];
        titleLabel.textAlignment = UITextAlignmentLeft;
        CGFloat height = [titleLabel.text sizeWithFont: titleLabel.font constrainedToSize: CGSizeMake(300, 1500) lineBreakMode: UILineBreakModeWordWrap].height;
        [titleLabel setFrame: CGRectMake(120, 180, 100, height)];
        [self addSubview:titleLabel];
        [titleLabel release];

    }
    return self;
}


- (void)drawRect:(CGRect)rect {

}


- (void)dealloc {
    [super dealloc];
    [spinner release];
}


@end
  • 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-13T12:40:19+00:00Added an answer on May 13, 2026 at 12:40 pm

    The problem was that self.view in the viewController had the tableView assigned directly. The solution is to assign the self.view a UIView and add the tableView and the custom UIView on top of self.view.

    This is sample code from the viewController.

    - (void)loadView {
    
    
        UIView *aView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    
        //tableView
        self.tableView = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] bounds] style:UITableViewStylePlain] autorelease];
        //set the rowHeight once for performance reasons.
        //self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        self.tableView.rowHeight = 75;
        self.tableView.backgroundColor = [UIColor clearColor];
        self.tableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight);                    
        self.tableView.delegate = self;
        self.tableView.dataSource = self;
        self.tableView.autoresizesSubviews = YES;
    
        [aView addSubview:tableView];
    
        //set the rowHeight once for performance reasons.
        self.view = aView;
        [aView release];
    
    }
    
    
    - (void)viewDidLoad {
        [super viewDidLoad];
    
        loadingView = [[LoadingView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        [self.view addSubview:loadingView];
    
    
        //fetch productsArray
        [self productListRequestStart];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'd suggest putting the setting in your app.config file, and… May 16, 2026 at 9:56 am
  • Editorial Team
    Editorial Team added an answer ((TextView)findViewById(R.id.text)).setText(Html.fromHtml("X<sup>2</sup>")); or Common Tasks and How to Do Them in… May 16, 2026 at 9:56 am
  • Editorial Team
    Editorial Team added an answer I found out to be.. protected int _getInitWorkerTime() { int… May 16, 2026 at 9:56 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Similar to this question I have a custom subclass of UITableViewCell that has a
I have a UIViewController that is being pushed via a UINavigationViewController. The viewController's view
I am trying to have a tableview that leads to another tableview whose list
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
When I touch (Touch Up) a UITableViewCell my ViewController's UITableViewDelegate method - (void)tableView:(UITableView *)tableView
I'm amused by a strange error that I'm encountering in my program. I have
I have a UITableView on a view. This UITableView has cells which are made
Ok heres the situation. I have a View controller class that serves as the
Very basic question about iPhone memory management: Say I have a viewController with several
Scenario: I have a UITabBar on the top of my view controller. There are

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.