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

Take long time to be displayed at UITableViewCell #28

Open
yukitoto opened this issue Jul 25, 2016 · 1 comment
Open

Take long time to be displayed at UITableViewCell #28

yukitoto opened this issue Jul 25, 2016 · 1 comment

Comments

@yukitoto
Copy link

yukitoto commented Jul 25, 2016

Thanks for greate library.
I use DOFavoriteButton to UITableViewCell. And I use autolayout.
I change the button image per cell, because each cell have each state.

Then, it takes long time to display the button.
Do you have any idea?

this is snnipet of set data to cell.

func setPostData(post: Post) {
        self.post = post

         if post.myLikeCount < 5 {
            likeIconImageView.imageColorOff = UIColor.myPinkColor()
            likeIconImageView.image               = UIImage(named: "fav")
        }
        else {
            likeIconImageView.imageColorOff = UIColor.mySecondaryColor()
            likeIconImageView.image              = UIImage(named: "fav_disabled")
        }
}
@rogomantik
Copy link

same problem
to me it was even crash I had to edit

public init(frame: CGRect, image: UIImage!) {
        super.init(frame: frame)
        DispatchQueue.main.async {
            self.image = image
            self.createLayers(image)
            self.addTargets()
            self.mDeselect(false)
        } 
    }

    public required init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)!
        DispatchQueue.main.async {
            self.createLayers(UIImage())
            self.addTargets()
            self.mDeselect(false)
        }

    }

but I'm still having problems. you only see the animation. the image is not drawn

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