Solved

Issue with text overlapping in table view when scrolling up and down

Posted on 2013-12-31
5
1,063 Views
Last Modified: 2014-02-01
I have a table in a view controller with text. When I scroll up and down, the text starts overlapping. I have included a couple of screen shots of the screen before and after I start scrolling. This issue just started when I began updating my app in xcode 5 for ios 7. This one has me stumped. Any ideas would be greatly appreciated.
Screen-Shot-2013-12-31-at-3.27.1.png
Screen-Shot-2013-12-31-at-3.27.3.png
0
Comment
Question by:dmalovich
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39757981
How do you construct that screen?
How is the scroll managed (assuming UIScrollView)?
0
 

Accepted Solution

by:
dmalovich earned 0 total points
ID: 39758093
I have figured out a solution. My original code was:

    CGRect delayLabelFrame = CGRectMake(10, 45, 140, 15);
      UILabel *delayLabel = [[UILabel alloc] initWithFrame:delayLabelFrame];
      delayLabel.font = [UIFont systemFontOfSize:12];
    delayLabel.text =  @"Passenger Vehicle Delay:";
    [cell.contentView addSubview:delayLabel];


What I needed to do was add a tag and check if the view was reprinted to the screen. My new code is:

    CGRect delayLabelFrame = CGRectMake(10, 45, 140, 15);
      UILabel *delayLabel = [[UILabel alloc] initWithFrame:delayLabelFrame];
      delayLabel.font = [UIFont systemFontOfSize:12];
    delayLabel.text =  @"Passenger Vehicle Delay:";
    delayLabel.tag = 5;
    if ([cell.contentView viewWithTag:5])
    {
        [[cell.contentView viewWithTag:5]removeFromSuperview];
    }
      [cell.contentView addSubview:delayLabel];
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39758311
I am trying to figure out how that helps you?
0
 

Author Closing Comment

by:dmalovich
ID: 39826058
I have figured out a solution. I have posted the code.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Learn new improvements released by Google for Google Calendar. Noted in this article are simple tips and tricks that can make your everyday use of Google Calendar better.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question