-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add support for NSCollectionView & NSTableView #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OskarGroth
Looks great!
Please check the some comments.
@@ -24,7 +24,10 @@ | |||
6B5B40AA211066EA00A931DB /* ArraySection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5B408A211066B300A931DB /* ArraySection.swift */; }; | |||
6B5B40AB211066EA00A931DB /* AnyDifferentiable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5B408B211066B300A931DB /* AnyDifferentiable.swift */; }; | |||
6B5B40AC211066EA00A931DB /* ElementPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5B408D211066B300A931DB /* ElementPath.swift */; }; | |||
6B956B762110B25300DE3D29 /* UIKitExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5B4088211066B300A931DB /* UIKitExtension.swift */; }; | |||
75C6E50A214D66F80016493B /* UITableView+Reload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C6E509214D66F80016493B /* UITableView+Reload.swift */; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer that AppKitExtension
and UIKitExtension
to the file names.
// | ||
// Created by Oskar Groth on 2018-09-15. | ||
// Copyright © 2018 Ryo Aoyama. All rights reserved. | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nit] Please remove all the header comments.
|
||
@available(OSXApplicationExtension 10.11, *) | ||
public extension NSCollectionView { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nit] Please remove unneeded empty line.
endUpdates() | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -33,7 +41,7 @@ public extension UITableView { | |||
setData: setData | |||
) | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nit] Please revert all the white space changes.
Could you add a simple example app? |
Cleaned up PR and added example project, see gif at top 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OskarGroth
Wow, This is awesome! Thaks.
@OskarGroth @ra1028 I'm having an issue with the sample. When you click Shuffle button, the data you see in the table view is not same as the collection view although they are using the same array: The collection view works well. If you add this code after shuffling the array, the table view will be reloaded and show correct data after 1s: dataInput.shuffle()
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.tableView.reloadData()
self.collectionView.reloadData()
} |
Hello, thanks for an awesome framework!
This PR adds support for reloading
NSCollectionView
andNSTableView
on macOS.I've renamed and reorganized the existingUIExtensions
toExtensions
with categories for respective class.