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

Update README.md #98

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Update README.md #98

wants to merge 6 commits into from

Conversation

aleene
Copy link
Contributor

@aleene aleene commented Dec 3, 2016

Added a separate section in the Readme with all the layout variables.

Added a separate section in the Readme with all the layout variables.
Added spaces
some more spaces
needed one more space
and again
@anti-transmission anti-transmission self-requested a review January 31, 2017 12:54
@@ -13,16 +13,13 @@ Supports Storyboard, Auto Layout, and @IBDesignable.

## Usage

The most convinient way is to use Storyboard. Drag a view to Storyboard and set Class to `TagListView` (if you use CocoaPods, also set Module to `TagListView`). Then you can play with the attributes in the right pane, and see the preview in real time thanks to [@IBDesignable](http://nshipster.com/ibinspectable-ibdesignable/).
The most convenient way is to use Storyboard. Drag a view to Storyboard and set Class to `TagListView` (if you use CocoaPods, also set Module to `TagListView`). Then you can play with the attributes in the right pane, and see the preview in real time thanks to [@IBDesignable](http://nshipster.com/ibinspectable-ibdesignable/).

<img alt="Interface Builder" src="Screenshots/InterfaceBuilder.png" width="566">

You can add tag to the tag list view, or set custom font and alignment through code:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove or set custom font and alignment through code

### Layouting tags
It is also possible to layout the tagViews in code with:
```swift
tagListView.textColor: UIColor = UIColor.white
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove all the types (: UIColor, : CGFloat, etc) here?

tagListView.marginX: CGFloat = 5
tagListView.textFont = UIFont.systemFontOfSize(24)
tagListView.alignment = .Center // possible values are .Left, .Center, and .Right
tagListView.alignment = UIFont.systemFont(ofSize: 15)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not alignment?

tagListView.alignment.shadowOpacity = 0.4
tagListView.alignment.shadowColor = UIColor.black
tagListView.alignment.shadowOffset = CGSize(width: 1, height: 1)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra empty line?

Copy link
Collaborator

@anti-transmission anti-transmission left a comment

Choose a reason for hiding this comment

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

Thank you!!! Some minor comments.

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.

2 participants