Skip to content

Commit

Permalink
change README.md to English
Browse files Browse the repository at this point in the history
  • Loading branch information
zsk425 committed Jan 12, 2015
1 parent da0ee86 commit b730a60
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
21 changes: 6 additions & 15 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
**Copyright (c) 2012-2013 Matt Diephouse**
This code is distributed under the terms and conditions of the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Copyright (c) 2014 Shaokang Zhao

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
这个项目由[SFTagView](https://github.com/shiweifu/SFTagView)而来,修改了自动布局操作,添加单行支持,依赖Auto layout库[Masonry](https://github.com/Masonry/Masonry)
## SKTagView

当在UITableViewCell中使用多行模式时,请先设置preferredMaxLayoutWidth属性。
This project is derived from [SFTagView](https://github.com/shiweifu/SFTagView),which tries to build a view displaying tags without using UICollectionView and supports auto layout.It's a good begining,but not good enough.

###使用说明
So I try to make it more auto layout.After tring a lot,I inspired by UILabel.Now it just works like a UILabel and supports single line and multi-line.

### Installation with CocoaPods

```ruby
platform :ios, '7.0'
pod "SKTagView"
```

### Usage

```objc
- (void)setupTagView
Expand All @@ -23,7 +32,7 @@
make.trailing.equalTo(superView.mas_trailing);
}];

//添加Tags
//Add Tags
[@[@"Python", @"Javascript", @"HTML", @"Go", @"Objective-C",@"C", @"PHP"] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop)
{
SKTag *tag = [SKTag tagWithText:obj];
Expand All @@ -38,6 +47,16 @@
}
```

详情见图:
### Tips
When use with UITableViewCell in multi-line mode,it MUST be set preferredMaxLayoutWidth before invoking
```objc
[cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + 1;
```
### Screenshot
![](https://raw.github.com/zsk425/SKTagView/master/Screenshots/example.png)
### License
AFNetworking is available under the MIT license. See the LICENSE file for more info.
2 changes: 1 addition & 1 deletion WrapViewWithAutolayout/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ @interface AppDelegate ()
@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
return YES;
}

Expand Down

0 comments on commit b730a60

Please sign in to comment.