Skip to content

Comments

More wrappers#35

Merged
eddiekaiger merged 18 commits intoeddiekaiger:masterfrom
RomanPodymov:feature/uikit
Jun 10, 2019
Merged

More wrappers#35
eddiekaiger merged 18 commits intoeddiekaiger:masterfrom
RomanPodymov:feature/uikit

Conversation

@RomanPodymov
Copy link
Contributor

@RomanPodymov RomanPodymov commented May 31, 2019

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.

@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #35 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            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

@eddiekaiger
Copy link
Owner

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

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.

Copy link
Contributor Author

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

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

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

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 typealiases are declared here because they're used in this file

@eddiekaiger eddiekaiger merged commit f599af5 into eddiekaiger:master Jun 10, 2019
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.

3 participants