Skip to content

Commit

Permalink
Add new aliases (#6)
Browse files Browse the repository at this point in the history
* Updated the README file to provide information about guidelines and enhancements
Added support for CollectionViews, TextField and Labels
Added ActivityIndicatorView support
Provide mechanism to apply tintColor to NSUIImageView

* Fix alias error for UICollectionViewCell

* Moving NSUIImageView to the proper Aliases.swift file

* Make tintColor a variable setter for NSUIImageView(AppKit) as to not break UIKit logic.

* Add new aliases
Update README
  • Loading branch information
martindufort authored Mar 22, 2024
1 parent 38439e1 commit 495d36b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ NSUICollectionViewFlowLayout
NSUICollectionViewLayoutAttributes
NSUICollectionViewDelegateFlowLayout
NSUIButton
NSUIColor
NSUIEdgeInsets
NSUIFont
Expand All @@ -53,6 +54,8 @@ NSUILongPressGestureRecognizer
NSUINib
NSUIPasteboard
NSUIResponder
NSUIStackView
NSUIStoryboard
NSUITapGestureRecognizer
NSUITextStorageEditActions
NSUITextField
Expand Down
14 changes: 14 additions & 0 deletions Sources/NSUI/Aliases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public typealias NSUIApplicationDelegate = NSApplicationDelegate
@available(macOS 11.0, *)
public typealias NSUIApplicationDelegateAdaptor = NSApplicationDelegateAdaptor

// Storyboard
public typealias NSUIStoryboard = NSStoryboard

// Collection View
public typealias NSUICollectionDataSource = NSCollectionViewDataSource
public typealias NSUICollectionView = NSCollectionView
Expand All @@ -30,10 +33,14 @@ public typealias NSUINib = NSNib
public typealias NSUIPasteboard = NSPasteboard
public typealias NSUIResponder = NSResponder
public typealias NSUITapGestureRecognizer = NSClickGestureRecognizer

// Views
public typealias NSUIButton = NSButton
public typealias NSUITextField = NSTextField
public typealias NSUITextFieldDelegate = NSTextFieldDelegate
public typealias NSUITextView = NSTextView
public typealias NSUIView = NSView
public typealias NSUIStackView = NSStackView
public typealias NSUIViewController = NSViewController
public typealias NSUIHostingController = NSHostingController
public typealias NSUIWorkspace = NSWorkspace
Expand All @@ -47,6 +54,9 @@ public typealias NSUIApplicationDelegate = UIApplicationDelegate
@available(iOS 14.0, tvOS 14.0, *)
public typealias NSUIApplicationDelegateAdaptor = UIApplicationDelegateAdaptor

// Storyboard
public typealias NSUIStoryboard = UIStoryboard

// Collection View
public typealias NSUICollectionDataSource = UICollectionViewDataSource
public typealias NSUICollectionView = UICollectionView
Expand All @@ -70,10 +80,14 @@ public typealias NSUINib = UINib
public typealias NSUIPasteboard = UIPasteboard
public typealias NSUIResponder = UIResponder
public typealias NSUITapGestureRecognizer = UITapGestureRecognizer

// Views
public typealias NSUIButton = UIButton
public typealias NSUITextField = UITextField
public typealias NSUITextFieldDelegate = UITextFieldDelegate
public typealias NSUITextView = UITextView
public typealias NSUIView = UIView
public typealias NSUIStackView = UIStackView
public typealias NSUIViewController = UIViewController
public typealias NSUIHostingController = UIHostingController
public typealias NSUIWorkspace = UIApplication
Expand Down

0 comments on commit 495d36b

Please sign in to comment.