Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Add complete documentation to the public interface #16

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

liamnichols
Copy link
Owner

Closes #5

Copy link
Contributor

@bcylin bcylin left a comment

Choose a reason for hiding this comment

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

Looks nice and clear 👍

}

/// TBC
/// The following constants specify predefined format styles for list items.
@objc(LNListItemFormatterStyle) public enum Style: Int {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nits] Maybe it's worth mentioning Mode and Style are for constructing the keys like standard, standardNarrow, and standardShort used in the plists?

Copy link
Owner Author

Choose a reason for hiding this comment

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

My original intention was to not mention any specifics on the underlying implementation but thinking about it, I don't see no harm so I'll give it a go 👍

/// - Parameter list: TBC
/// - Returns: TBC
/// - Returns: A string representation of `list` formatted using the receiver’s
/// current settings.
@objc public func string(from list: [String]) -> String? {
return string(for: list)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

[Q] Do you think it's a good idea to overload the method in Swift and expose a different name to Objective-C?

@objc(stringFrom:)
func string(for list: [String]) -> String?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ahh I didn't think about this. I already opened #17 for improvements to the return value so can add this to that issue and tackle it separately to the documentation, thanks!

@liamnichols liamnichols force-pushed the ln/document-interface branch from 467cf73 to bf2c8bb Compare April 5, 2019 12:47
@liamnichols liamnichols merged commit 7293f2a into master Apr 5, 2019
@liamnichols liamnichols deleted the ln/document-interface branch April 5, 2019 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants