Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Sometimes text doesn't appear? #49

Open
Macro206 opened this issue Jul 24, 2013 · 5 comments
Open

Sometimes text doesn't appear? #49

Macro206 opened this issue Jul 24, 2013 · 5 comments

Comments

@Macro206
Copy link

Sometimes the text in the bubble doesn't appear. This happens very often. Any ideas?
I've noticed that the bubble appears and stretches correctly based on the text - it's just that the text doesn't display.

@natehudson
Copy link

I am also seeing this problem and can't figure out why. Sometimes the text just appears a few seconds later.

Could it have to do with some UI code no running on the main thread?

@eliburke
Copy link

eliburke commented Oct 8, 2013

I've been seeing this intermittently since iOS7 as well. I'm using a heavily modified subclass of HPLChatTableViewCell and I assumed that I broke something, but this sounds like behavior I've encountered.

@leilagonzalez
Copy link

Same problem here. Any solutions yet?

I'm also running some code out of the main thread, but when I log the content of the cell everything seems to be ok and the data is already available.

@ihla
Copy link

ihla commented May 18, 2014

I was facing the same issue when I scroll down/up the rows and then dismissed the keyboard some texts disappeared, I was able to reproduce it quite easy. I found out that the UILabel was not in the view hierarchy of the UITableViewCell when the text disappeared. There are similar issues discussed on the stackoverflow and one recommended solution is to use view tag along with the views which are dynamically added/removed - I tried it and it worked. The code snippet is like this:

[[self.contentView viewWithTag:kCustomViewTag] removeFromSuperview];
self.customView = data.view;
self.customView.tag = kCustomViewTag;
[self.contentView addSubview:self.customView];

@kgrigsby59
Copy link

Below is a similar fix that works for me.

- (void)prepareForReuse
{
    [super prepareForReuse];

    if (self.customView.superview == self.contentView) {
        [self.customView removeFromSuperview];
    }
    self.customView = nil;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants