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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:44:13+00:00 2026-06-08T11:44:13+00:00

Using UIView animateWithDuration , I’m setting a UITableView alpha to 0 so that it

  • 0

Using UIView animateWithDuration, I’m setting a UITableView alpha to 0 so that it fades away in a disappearing animation. However, I’m noticing that when the UITableView fades, there are areas on each cell that turn black before fading. If there is an image, the whole area behind it turns black while fading, and usually the inset space on both the left and right edge turn black. I’ve tried setting all of the background colors of the UITableViewCell subviews to white and it still doesn’t work.

This tableview is not embedded in a UITableViewController. Instead, it’s a separate floating tableView that I’m using as a menu.

Here is an example of what happens when it’s fading:

enter image description here

Here is the code I’m using as well

[UIView animateWithDuration:ImageViewControllerBarsAnimationDuration delay:0 options: UIViewAnimationOptionAllowUserInteraction animations:^
    {
            if (self.menu.superview)
            {
                self.menu.alpha = 0;
            }
    } 
completion:^(BOOL finished)
{
            if (self.menu.superview)
            {
                [self.menu removeFromSuperview];
                self.menu.alpha = 1;
            }   
}];

+

- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *cellIdentifier = @"Cell";

    UITableViewCell *tableViewCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

    if (tableViewCell == nil) 
    {
        tableViewCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
    }

    [[tableViewCell textLabel] setFont:[UIFont fontWithName: @"Helvetica-Bold" size: 17]];
    [[tableViewCell textLabel] setText: [self.menuItems objectAtIndex:0]];
    [[tableViewCell imageView] setImage: [self.menuItems objectAtIndex:1]];

    return tableViewCell;
}
  • 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-08T11:44:19+00:00Added an answer on June 8, 2026 at 11:44 am

    DTS gave me a solution to this, have to do the following:

    self.myTableView.backgroundView = nil;
    self.myTableView.backgroundColor = [UIColor clearColor];
    

    Then inside of cellForRowAtIndexPath method have to do this:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *kOneCellID = @"cellID";
    
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kOneCellID];
        if (cell == nil)
        {
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kOneCellID] autorelease];
            cell.backgroundView = [[UIView alloc] init];
            cell.backgroundView.backgroundColor = [UIColor whiteColor];
    
        }
    
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In iOS, you can animate view objects using animation blocks: [UIView animateWithDuration:1.0 animations:^{ firstView.alpha
I am using a simple transformation animation to an UIIMageView. [UIView animateWithDuration:2 delay:0 options:UIViewAnimationOptionBeginFromCurrentState|UIViewAnimationOptionCurveEaseInOut
I'm using UIView class method animateWithDuration for repeating my view animation. How can I
I have a simple UIView that draws itself using drawRect: . In order for
I have a UIView on top of another view that's using a UITouchGesture. The
I'm using a rotation animation created with CABasicAnimation . It rotates a UIView over
Similar to SO question ref: Why does UIView:animateWithDuration complete immediately? however, my code is
In my app when I am switching views with an animation using UIView animations,
I have a UIScrollView subclass that I am programmatically scrolling using UIView animations. I'd
I'm using UIView's + animateWithDuration:delay:options:animations:completion: method to move my view along a line over

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.