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

UINavigationBar wrappers #34

Merged
merged 9 commits into from
May 30, 2019
Merged

UINavigationBar wrappers #34

merged 9 commits into from
May 30, 2019

Conversation

RomanPodymov
Copy link
Contributor

@RomanPodymov RomanPodymov commented May 26, 2019

Hello.
In this pull request I added wrappers for UINavigationBar.titleTextAttributes and UINavigationBar.largeTitleTextAttributes.
Use cocoapods 1.7.0.

@codecov-io
Copy link

codecov-io commented May 27, 2019

Codecov Report

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

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   99.74%   99.74%   +<.01%     
==========================================
  Files          10       11       +1     
  Lines         385      393       +8     
==========================================
+ Hits          384      392       +8     
  Misses          1        1

@RomanPodymov RomanPodymov changed the title Wrappers UINavigationBar wrappers May 27, 2019
Copy link
Owner

@eddiekaiger eddiekaiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding these in! been on my list of to-dos

#endif

public typealias UnderlineStyle = NSUnderlineStyle
public typealias StrikethroughStyle = NSUnderlineStyle
public typealias ParagraphStyle = NSParagraphStyle
public typealias DrawingContext = NSStringDrawingContext
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 remove all these new typealiases since they're not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we remove all these new typealiases since they're not used?

I planned to use them for some new functions but then I moved them to another pull request.

#elseif os(watchOS)
#else
import UIKit
public typealias NavigationBar = UINavigationBar
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the typealias since there's no conflicting navigation bar type

#else
extension NavigationBar {

public var swiftyTitleTextAttributes: [Attribute]? {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add some documentation to both of these variables? thanks 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add some documentation to both of these variables? thanks 🙏

Added description for these new properties, if you want you can add something better.


#if os(macOS)
#elseif os(watchOS)
#else
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could just extend the above macros for the entire file so that you don't need to repeat them

Copy link
Owner

@eddiekaiger eddiekaiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍🏻

@eddiekaiger eddiekaiger merged commit ee0f062 into eddiekaiger:master May 30, 2019
@eddiekaiger
Copy link
Owner

@RomanPodymov do you have more PRs coming? If you do I'll hold off on releasing a new version and just bundle in all those changes.

@RomanPodymov
Copy link
Contributor Author

@RomanPodymov do you have more PRs coming? If you do I'll hold off on releasing a new version and just bundle in all those changes.

I added an extension for NSString in this branch https://github.com/RomanPodymov/SwiftyAttributes/tree/feature/uikit. But I don't know how can I write tests for all these new functions. That's why I postponed the pull request.

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