From b3ffafc018978c20845a3b5aa7b2edb9db8c7622 Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Fri, 3 Nov 2017 13:17:12 -0700 Subject: [PATCH] Adds header docs to listener API in IGListAdapter #trivial Summary: Issue fixed: #997 - [X] All tests pass. Demo project builds and runs. - [ ] I added tests, an experiment, or detailed why my change isn't tested. - [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/1000 Differential Revision: D6233518 Pulled By: rnystrom fbshipit-source-id: ba944c29d094ac83554a97326bc5212ef1fd8671 --- Source/IGListAdapter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/IGListAdapter.h b/Source/IGListAdapter.h index 73773508..d99c5e96 100644 --- a/Source/IGListAdapter.h +++ b/Source/IGListAdapter.h @@ -262,8 +262,20 @@ NS_SWIFT_NAME(ListAdapter) - (CGSize)sizeForSupplementaryViewOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath; +/** + Adds a listener to the list adapter. + + @param updateListener The object conforming to the `IGListAdapterUpdateListener` protocol. + + @note Listeners are held weakly so there is no need to call `-[IGListAdapter removeUpdateListener:]` on `dealloc`. + */ - (void)addUpdateListener:(id)updateListener; +/** + Removes a listener from the list adapter. + + @param updateListener The object conforming to the `IGListAdapterUpdateListener` protocol. + */ - (void)removeUpdateListener:(id)updateListener; /**