Skip to content

NSAttributedString: Align methods with Darwin. #1281

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

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Oct 23, 2017

  • Add struct NSAttributedStringKey and use for the attribute key
    instead of String.

- Add struct NSAttributedStringKey and use for the attribute key
  instead of String.
@spevans
Copy link
Contributor Author

spevans commented Oct 23, 2017

@swift-ci please test

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Oct 23, 2017

@swift-ci please test

open func attributes(at location: Int, effectiveRange range: NSRangePointer) -> [String : Any] {

/// Returns the attributes for the character at a given index.
open func attributes(at location: Int, effectiveRange range: NSRangePointer) -> [NSAttributedStringKey : Any] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

CFRunArrayInsert(_attributeArray, range, attrs._cfObject)
var _attrs: [String: Any] = [:]
for (key, value) in attrs {
_attrs[key.rawValue] = value
Copy link
Contributor

Choose a reason for hiding this comment

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

Bleh.

@spevans
Copy link
Contributor Author

spevans commented Oct 24, 2017

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented Oct 24, 2017

@swift-ci please test

@ianpartridge
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit d91a7af into swiftlang:master Oct 24, 2017
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