-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support AppKit #351
base: master
Are you sure you want to change the base?
Support AppKit #351
Conversation
#endif | ||
|
||
extension NSUIView { | ||
var _layer: CALayer? { |
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.
Variable name should only contain alphanumeric characters: '_layer'
} | ||
|
||
func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem { | ||
let viewItem = collectionView.makeItem(withIdentifier: .init(String(describing: CollectionViewItem.self)), for: indexPath) as! CollectionViewItem |
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.
Force casts should be avoided.
@main | ||
class AppDelegate: NSObject, NSApplicationDelegate { | ||
|
||
|
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.
Lines should not have trailing whitespace.
} | ||
#endif | ||
|
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.
Files should have a single trailing newline.
circle.frame = frame | ||
circle.add(groupAnimation, forKey: "animation") | ||
layer.addSublayer(circle) | ||
} | ||
} | ||
#endif | ||
|
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.
Files should have a single trailing newline.
Code Climate has analyzed commit 21a4a0d and detected 23 issues on this pull request. Here's the issue category breakdown:
Note: there are 2 critical issues. View more on Code Climate. |
I made some modifications to make it work in AppKit as well and have the same effect as iOS and MacCatalyst, and added example programs.