-
Notifications
You must be signed in to change notification settings - Fork 83
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
More wrappers #35
More wrappers #35
Conversation
UINavigationBar wrappers (#34)
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
+ Coverage 99.74% 99.74% +<.01%
==========================================
Files 11 13 +2
Lines 393 399 +6
==========================================
+ Hits 392 398 +6
Misses 1 1 |
Thanks! Sorry for the delay -- will take a closer look at this later today or tomorrow. |
|
||
- parameter attrs: The attributes to use. | ||
*/ | ||
public func size(withSwiftyAttributes attrs: [Attribute]? = nil) -> Size { |
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'd leave out the default parameter here because then size()
will be ambiguous.
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.
Hello @eddiekaiger
What about the swifty_
prefix for all these functions?
- parameter swiftyAttributes: The attributes to use. | ||
- parameter context: Drawing context. | ||
*/ | ||
public func boundingRect(with size: Size, options: DrawingOptions = [], swiftyAttributes: [Attribute]? = nil, context: DrawingContext?) -> Rect { |
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.
same here, I'd leave out the default parameter for swiftyAttributes
- parameter swiftyAttributes: The attributes to use. | ||
*/ | ||
@available(macOS, deprecated: 10.12) | ||
public func boundingRect(with size: Size, options: DrawingOptions = [], swiftyAttributes: [Attribute]? = nil) -> Rect { |
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.
and here
public typealias Point = CGPoint | ||
public typealias Size = CGSize | ||
public typealias Rect = CGRect | ||
public typealias DrawingOptions = NSStringDrawingOptions |
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.
could we maybe move these to the files where they're used? The other typealiase
s are declared here because they're used in this file
Hello.
As I wrote before here is a pull request with more wrappers. However I don't know how can I write tests for these functions to pass the Codecov check.