Skip to content

Commit

Permalink
1. Bump to version 1.0.0
Browse files Browse the repository at this point in the history
2. Update README
3. Update example
  • Loading branch information
zekunyan committed Oct 16, 2016
1 parent 6218413 commit b23c5f7
Show file tree
Hide file tree
Showing 15 changed files with 237 additions and 114 deletions.
6 changes: 3 additions & 3 deletions Example/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- TTGTagCollectionView (0.5.0)
- TTGTagCollectionView (1.0.0)

DEPENDENCIES:
- TTGTagCollectionView (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
TTGTagCollectionView: 94c43e13df2e39bdd8f37bd038438f183add84a4
TTGTagCollectionView: 7ed196f959f797c23e5dfc3754989718172d1cf1

PODFILE CHECKSUM: f0fc553868b0459c5bd7ac738bceafe55aa8f98d

COCOAPODS: 1.0.1
COCOAPODS: 1.1.0.rc.2
8 changes: 4 additions & 4 deletions Example/Pods/Local Podspecs/TTGTagCollectionView.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

190 changes: 104 additions & 86 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/TTGTagCollectionView.xcodeproj/project.pbxproj
Expand Up @@ -387,7 +387,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
C0B487736D45FBD6C2EB8B7B /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -417,7 +417,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
2 changes: 1 addition & 1 deletion Example/TTGTagCollectionView/Main.storyboard
Expand Up @@ -89,7 +89,7 @@
<constraint firstItem="FgE-N2-9mm" firstAttribute="trailing" secondItem="TpU-gO-2f1" secondAttribute="trailingMargin" id="yK2-gz-kpL"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="1kH-BO-Stk"/>
<navigationItem key="navigationItem" title="TTGTagCollectionView" id="1kH-BO-Stk"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand Down
52 changes: 40 additions & 12 deletions README.md
Expand Up @@ -5,16 +5,16 @@
[![License](https://img.shields.io/cocoapods/l/TTGTagCollectionView.svg?style=flat)](http://cocoapods.org/pods/TTGTagCollectionView)
[![Platform](https://img.shields.io/cocoapods/p/TTGTagCollectionView.svg?style=flat)](http://cocoapods.org/pods/TTGTagCollectionView)

![Screenshot](http://7nj2iz.com1.z0.glb.clouddn.com/TTGTagCollectionView_screenshot.jpeg)
![Screenshot](https://github.com/zekunyan/TTGTagCollectionView/raw/master/Resources/screen_shot.jpeg)

## What

TTGTagCollectionView is useful for showing different size tag views in a vertical scrollable view. And if you only want to show text tags, you can use TTGTextTagCollectionView instead, which has more simple api. At the same time, It is highly customizable that many features of the text tag can be configured, like the tag font size and the background color.
TTGTagCollectionView is useful for showing different size tag views in a vertical or horizontal scrollable view. And if you only want to show text tags, you can use TTGTextTagCollectionView instead, which has more simple api. At the same time, It is highly customizable that many features of the text tag can be configured, like the tag font size and the background color.

## Features
* Both text tag and custom view tag supported.
* Highly customizable
* Vertical scrollable
* Vertical and horizontal scrollable
* Power by UICollectionView
* Support Autolayout `intrinsicContentSize` to auto determine height based on content size

Expand Down Expand Up @@ -50,7 +50,7 @@ Conform the `TTGTextTagCollectionViewDelegate` protocol to get callback when you
@optional
- (void)textTagCollectionView:(TTGTextTagCollectionView *)textTagCollectionView didTapTag:(NSString *)tagText atIndex:(NSUInteger)index selected:(BOOL)selected;
- (void)textTagCollectionView:(TTGTextTagCollectionView *)textTagCollectionView updateContentHeight:(CGFloat)newContentHeight;
- (void)textTagCollectionView:(TTGTextTagCollectionView *)textTagCollectionView updateContentSize:(CGSize)contentSize;
@end
```

Expand Down Expand Up @@ -87,8 +87,14 @@ Conform the `TTGTextTagCollectionViewDelegate` protocol to get callback when you
@property (assign, nonatomic) CGFloat horizontalSpacing;
@property (assign, nonatomic) CGFloat verticalSpacing;
// Content height
@property (assign, nonatomic, readonly) CGFloat contentHeight;
// Content size
@property (nonatomic, assign, readonly) CGSize contentSize;
// Scroll direction. Default is vertical
@property (nonatomic, assign) TTGTagCollectionScrollDirection scrollDirection;
// Number of lines for horizontal direction
@property (nonatomic, assign) NSUInteger numberOfLinesForHorizontalScrollDirection;
```

#### Config tags
Expand Down Expand Up @@ -125,6 +131,7 @@ Conform the `TTGTextTagCollectionViewDelegate` protocol to get callback when you

#### Reload
You can reload tags programmatically.

```
- (void)reload;
```
Expand All @@ -136,6 +143,7 @@ Use `TTGTagCollectionView` to show custom tag views.
Just like the UITableView, you must conform and implement the required methods of `TTGTagCollectionViewDelegate` and `TTGTagCollectionViewDataSource` to get `TTGTagCollectionView` work.

**DataSource**

```
@protocol TTGTagCollectionViewDataSource <NSObject>
@required
Expand All @@ -146,6 +154,7 @@ Just like the UITableView, you must conform and implement the required methods o
```

**Delegate**

```
@protocol TTGTagCollectionViewDelegate <NSObject>
@required
Expand All @@ -154,20 +163,39 @@ Just like the UITableView, you must conform and implement the required methods o
@optional
- (void)tagCollectionView:(TTGTagCollectionView *)tagCollectionView didSelectTag:(UIView *)tagView atIndex:(NSUInteger)index;
- (void)tagCollectionView:(TTGTagCollectionView *)tagCollectionView updateContentHeight:(CGFloat)newContentHeight;
- (void)tagCollectionView:(TTGTagCollectionView *)tagCollectionView updateContentSize:(CGSize)contentSize;
@end
```

#### Customization

You can config the horizontal and vertical space between tags.

```
// Space
@property (assign, nonatomic) CGFloat horizontalSpacing;
@property (assign, nonatomic) CGFloat verticalSpacing;
/**
* Tags scroll direction, default is veritical
*/
@property (nonatomic, assign) TTGTagCollectionScrollDirection scrollDirection;
/**
* Number of lines for horizontal scroll direction
*/
@property (nonatomic, assign) NSUInteger numberOfLinesForHorizontalScrollDirection;
/**
* Horizontal space between tags
*/
@property (nonatomic, assign) CGFloat horizontalSpacing;
/**
* Vertical space between tags
*/
@property (nonatomic, assign) CGFloat verticalSpacing;
// Content height
@property (assign, nonatomic, readonly) CGFloat contentHeight;
/**
* The true tags content size
*/
@property (nonatomic, assign, readonly) CGSize contentSize;
```

#### Reload
Expand Down
Binary file added Resources/screen_shot.jpeg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions TTGTagCollectionView.podspec
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = "TTGTagCollectionView"
s.version = "0.5.0"
s.summary = "Show simple text tags or custom tag views in a vertical scrollable view."
s.version = "1.0.0"
s.summary = "Show simple text tags or custom tag views in a vertical or horizontal scrollable view."

s.description = <<-DESC
TTGTagCollectionView is useful for showing different size tag views in a vertical scrollable view and support Autolayout intrinsicContentSize at the same time. And if you only want to show text tags, you can use TTGTextTagCollectionView instead, which has more simple api. At the same time, It is highly customizable that many features of the text tag can be configured, like the tag font size and the background color.
TTGTagCollectionView is useful for showing different size tag views in a vertical or horizontal scrollable view and support Autolayout intrinsicContentSize at the same time. And if you only want to show text tags, you can use TTGTextTagCollectionView instead, which has more simple api. At the same time, It is highly customizable that many features of the text tag can be configured, like the tag font size and the background color.
DESC

s.homepage = "https://github.com/zekunyan/TTGTagCollectionView"
Expand Down

0 comments on commit b23c5f7

Please sign in to comment.