-
Notifications
You must be signed in to change notification settings - Fork 494
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
base: master
Are you sure you want to change the base?
Update README.md #98
Conversation
Added a separate section in the Readme with all the layout variables.
Added spaces
some more spaces
needed one more space
and again
typo
@@ -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: |
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.
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 |
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.
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) |
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.
Not alignment?
tagListView.alignment.shadowOpacity = 0.4 | ||
tagListView.alignment.shadowColor = UIColor.black | ||
tagListView.alignment.shadowOffset = CGSize(width: 1, height: 1) | ||
|
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.
Remove extra empty line?
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.
Thank you!!! Some minor comments.
Added a separate section in the Readme with all the layout variables.