Last active
June 20, 2019 06:36
-
-
Save hsleedevelop/13617b40c17255a544f0c8ca4a77c3c0 to your computer and use it in GitHub Desktop.
capture test
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
| @IBOutlet weak var collectionView: UICollectionView! | |
| .do(onNext: { [collectionView] offset -> Void in | |
| guard let cv = collectionView else { return } | |
| cv.isUserInteractionEnabled = cv.bounds.width == offset.x | |
| }) | |
| .do(onNext: { [weak collectionView] offset -> Void in | |
| guard let cv = collectionView else { return } | |
| cv.isUserInteractionEnabled = cv.bounds.width == offset.x | |
| }) | |
| .do(onNext: { [weak self] offset -> Void in | |
| guard let cv = self?.collectionView else { return } | |
| cv.isUserInteractionEnabled = cv.bounds.width == offset.x | |
| }) | |
| .do(onNext: { [weak self] offset -> Void in //Expression type '@lvalue Bool' is ambiguous without more context | |
| self?.collectionView.isUserInteractionEnabled = self?.collectionView.bounds.width == offset.x | |
| }) | |
| .do(onNext: { [unowned self] offset -> Void in //Expression type '@lvalue Bool' is ambiguous without more context | |
| self.collectionView.isUserInteractionEnabled = self.collectionView.bounds.width == offset.x | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment