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

Support AppKit #351

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Mx-Iris
Copy link

@Mx-Iris Mx-Iris commented Oct 19, 2024

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.

#endif

extension NSUIView {
var _layer: CALayer? {
Copy link

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
Copy link

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 {


Copy link

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

Copy link

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

Copy link

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.

Copy link

codeclimate bot commented Oct 19, 2024

Code Climate has analyzed commit 21a4a0d and detected 23 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 20
Clarity 1
Complexity 1
Bug Risk 1

Note: there are 2 critical issues.

View more on Code Climate.

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.

1 participant