This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AsyncImageView: UIImageView { | |
| private class ImageLoadOperation { | |
| private(set) var isCancelled: Bool = false | |
| func cancel() { | |
| isCancelled = true | |
| } | |
| } | |
| private var imageLoadOperation: ImageLoadOperation? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface YourViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { | |
| UIImageOrientation scrollOrientation; | |
| CGPoint lastPos; | |
| } | |
| - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { | |
| if (tableView.isDragging) { | |
| UIView *myView = cell.contentView; | |
| CALayer *layer = myView.layer; | |
| CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; |