Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] allow to use array in RegisteringNibs #36

Closed

Conversation

ostk0069
Copy link
Contributor

Hi! I am using this in my company's project!
This is very very comfortable and I love it!

Today, I would like to recommend this function to make this much better.
I think this would make coding faster and nicer.
(I think if this could be okay to merge, there would be more couple of place to fix.
ex, not only the case with registerNib but register or not only UITableView but UICollectionView and more)

I hope this would make any help. Thanks.

@tarunon
Copy link
Owner

tarunon commented Mar 22, 2019

Thanks propose it!
Is it work correctly? Looks this Array lock in 1 type. Can't pass multiple types this way.🤔

I will check it lator.

@ostk0069
Copy link
Contributor Author

Thanks for your reply.
For this code, I mean to do it only for registerNib(only when calling Reusable & NibType).

public func registerNib<C: UITableViewCell>(type: C.Type) where C: Reusable, C: NibType {

public func registerNib<C: UITableViewCell>(type: C.Type) where C: Reusable, C: NibType {
            register(C.nib, forCellReuseIdentifier: C.reusableIdentifier)
        }

if you liked my propose to add this function, I would like to add other function related to this which would pass multiple types.

@tarunon
Copy link
Owner

tarunon commented Mar 22, 2019

Hmm, Could you please add test cases for that?
I think I can understand correctly your hope from test cases.

@tarunon
Copy link
Owner

tarunon commented Mar 22, 2019

I try to use it, looks not work correctly 🤔
スクリーンショット 2019-03-22 15 27 09

@tarunon
Copy link
Owner

tarunon commented Mar 22, 2019

So, If my understanding is correct, it's really difficult to register them onetime using Array.

@ostk0069
Copy link
Contributor Author

Thanks. I got what you meant to say.
Swift Type does not allow us to take more than one.
If I could find the way it works, I will throw another PR again.
Thanks for the conversation.

@ostk0069 ostk0069 closed this Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants