Replace reusable identifier methods with a C function (#40)#49
Replace reusable identifier methods with a C function (#40)#49kylehickinson wants to merge 1 commit intoInstagram:masterfrom kylehickinson:gen-reusable-id
Conversation
| NS_ASSUME_NONNULL_BEGIN | ||
|
|
||
| // Generate the string representation of a reusable view class when registering with a UICollectionView | ||
| NS_INLINE NSString *IGListReusableViewIdentifierForClass(Class viewClass, NSString * _Nullable nibName, NSString * _Nullable kind) { |
There was a problem hiding this comment.
very minor nits: 😄
- use 3
///for comment (for xcode docs) - docs: "Generates a string..." and
.at the end - naming:
IGListReusableViewIdentifier()
|
Looks great! Thanks @kylehickinson ! 💯 🎉 |
|
Nits picked! :). -- Except Im an idiot and didn't rename the callee's! Haha wait up |
|
@kylehickinson updated the pull request - view changes |
It would be great if you could add tests for a supplementary view kind. And actually, let's remove the |
|
@kylehickinson updated the pull request - view changes |
|
@kylehickinson updated the pull request - view changes |
|
Okay, removed |
|
@kylehickinson updated the pull request - view changes |
|
looks good to me! 💯 |
|
@kylehickinson updated the pull request - view changes |
|
Thanks for importing. If you are a Facebook employee, you can view this diff on Phabricator. |
|
Amazing, thanks @kylehickinson! Agree we can hold off in the nib stuff for now and add that in once we support it. |
Changes in this pull request
Replaced the two methods for generating a reusable identifier with an inline C function (as per #40) which has 3 parameters:
viewClass(unchanged),nibName(for when #1 is added), andkind. The string is generated following the same pattern as before.A few things:
NS_INLINEvsstatic inline.Pull request checklist