-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement basic initializers of NSAttributedString #297
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
Conversation
|
||
public class NSAttributedString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding { | ||
|
||
private var _cfAttributedString: CFAttributedString! |
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.
this would make NSAttributedString to be a has-a versus an is-a relationship to CFAttributedString; which is a variation (however it probably does not matter since there are not any CF apis that could take a attributed string.
It would be better to have this not be null resettable; removing the !
would be preferable.
@swift-ci Please test |
The implementation is based on CFAttributedString
`test_initWithAttributedString` was not included in TestNSAttributedString.allTests previously
These changes are following The Design Principles documentation: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Design.md
@swift-ci please test |
Hm, looks like this caused a build failure on Ubuntu 14.04:
|
I reverted the commit for now... |
@parkera I will look into that, thanks. |
add note about swift file recognition to vim-lsp section
Implemented and tested the following methods (and properties):
public var string: String
public var length: Int
public init(string str: String)
public init(string str: String, attributes attrs: [String : AnyObject]?)
public init(attributedString attrStr: NSAttributedString)
The implementation is based on CFAttributedString.