Iglistkit: RFC: Support NSCollectionView

Created on 14 Sep 2016  路  9Comments  路  Source: Instagram/IGListKit

Suggestion from an attendee of iOSDevUK where we announced the project. Wanted to record it.

I've never done any macOS work before, so I'm not sure how difficult this would be. But I know that NSCollectionView was modernized recently to mimic UICollectionView.

Open for discussion.

proposal wontfix

Most helpful comment

Seems doable if we only support macOS 10.11+

All 9 comments

Seems doable if we only support macOS 10.11+

@rnystrom Since there is no typealias in obj-c (we can use it in swift to switch type between different OS, I think it is a very elegant way to do cross-platform support), I think we will need a lot of

#if TARGET_OS_IOS
      xxxx
#elif TARGET_OS_MAC
      xxxx
#endif 

To switch between NSClasses and UIClasses. I'm not sure if you want that in the source code.

If you are OK with it, I think I can go on and work on this one.

@zhubofei let's hold on this for now, not sure its something we want to fully support yet. Issue is open as a discussion point more now than anything.

Relevant to this issue: #235

Just FYI: I tried doing what @zhubofei suggested but there are some very significant differences between NSCollectionView and UICollectionView. On macOS, collection view items are view controllers, not views, just to name one.

There are also major differences regarding view controllers, views and layouts on macOS which make porting the UI part of the project kind of hard. It is definitely doable, but will take a lot of work.

@insidegui I would say maybe it's better to build a side project specifically for macOS and keep this repo focusing on iOS & tvOS.

@insidegui Wow, I just found out that you're the author of this awesome article 馃憤. If UXKit is to be release in the near future, it will definitely be a good choice for this issue.

@insidegui awesome info, ya I have 0 experience w/ NSCollectionView. I'm going to close this out then since it sounds like this is would be pretty out of scope of what we want to achieve. +1 @zhubofei on someone spinning up a new project to do this maybe.

Was this page helpful?
0 / 5 - 0 ratings