Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shows empty cell #7

Open
sanketfirodiya opened this issue Feb 6, 2014 · 3 comments
Open

Shows empty cell #7

sanketfirodiya opened this issue Feb 6, 2014 · 3 comments

Comments

@sanketfirodiya
Copy link

My implementation does not show content in the cell.
Do I need to use a container view controller necessarily?
Or any ideas what else I could be missing?

Thanks in advance!!

@ashfurrow
Copy link
Contributor

Hi! Can you post your implementation file so I can help diagnose the problem?

@sanketfirodiya
Copy link
Author

    static NSString *CellIdentifier = @"TLSwipeForOptionsCell";
    cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) {
        cell = (TLSwipeForOptionsCell*)[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }
    UILabel *itemName = (UILabel*)[cell viewWithTag:1];
    [itemName setText:name];

    UILabel *itemDescription = (UILabel*)[cell viewWithTag:2];
    [itemDescription setText:description];

The tableViewCell displays the swipe behavior. Also if I set cell.textLabel.text = name, the text shows up.
Only when I try to display the elements from my storyboard using tags, the cell is blank.

@sanketfirodiya
Copy link
Author

I have also tried using this approach in the sample app and experience the same issue.
Basically the views inherited from storyboard do not show up.

However, when I swipe the cell beyond 50% to the left, the content can be seen underneath.
I have attached the screenshot.
tlswipeforoptionscell_bug

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

No branches or pull requests

2 participants