Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-12-31
5
Medium Priority
?
1,189 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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
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…

972 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