Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Add nullability annotations #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tflhyl
Copy link
Contributor

@tflhyl tflhyl commented Oct 18, 2017

No description provided.

@carlosalban
Copy link

Would love to resolve this conflict and merge. Really want to squash the implicit optionals

@tflhyl
Copy link
Contributor Author

tflhyl commented Apr 30, 2018

rebased

@@ -105,15 +107,15 @@ typedef NS_ENUM(NSUInteger, SSPullToRefreshViewStyle) {

@see initWithScrollView:delegate:
*/
@property (nonatomic, assign, readonly) UIScrollView *scrollView;
@property (nonatomic, weak, readonly, nullable) UIScrollView *scrollView;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the change from assign to weak caused a crash for me:

Fatal Exception: NSInternalInconsistencyException
An instance 0x1062ae600 of class UICollectionView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x17082c9a0> ( <NSKeyValueObservance 0x171243ea0: Observer: 0x105d80720, Key path: contentOffset, Options: <New: YES, Old: NO, Prior: NO> Context: 0x105d80720, Property: 0x174c42d30> )

It occurs on iOS 9 & 10 (not 11), when popping from one VC to another, both with a collection view with a pull to refresh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert back to unsafe_unretained (same as assign). this is because of kvo. ref: https://stackoverflow.com/questions/10793206/how-do-you-remove-kvo-from-a-weak-property posted by sam himself

lemme know if this works

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

Successfully merging this pull request may close these issues.

None yet

2 participants