Skip to content

UI operations in UIImageView+JMImageCache.m are being called outside the main thread. #40

@gilmorem

Description

@gilmorem

UIImageView+JMImageCache.m
Lines: 62, 63

 [self setNeedsDisplay];
 [self setNeedsLayout];

These methods affect UI operations of UIView. They need to be called on the main thread. This is causing many problems including causing animations on UIViews to stop working. Especially when using JMImageCache within a dynamic tableView or collectionView cell/itemForRowAtIndexPath.

Fix:
Just like you do in the other part of this block...

 dispatch_async(dispatch_get_main_queue(), ^{
    [self setNeedsDisplay];
    [self setNeedsLayout];
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions