Skip to content

Commit

Permalink
Readme file and pod spec updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hsusmita committed Jul 10, 2015
1 parent fac22ad commit 754db1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A UILabel subclass which responds to touch on specified patterns. It has the fol
#Installation

Add following lines in your pod file
pod 'ResponsiveLabel', '~> 1.0.1'
pod 'ResponsiveLabel', '~> 1.0.2'

#Usage

Expand Down Expand Up @@ -91,6 +91,20 @@ NSLog(@"Tap on truncation text");
}];
[self.customLabel setText:str withTruncation:YES];
```
#### Highlight Patterns On Tap
To highlight patterns, one can set the attributes:
* RLHighlightedForegroundColorAttributeName
* RLHighlightedBackgroundColorAttributeName

```
self.customLabel.userInteractionEnabled = YES;
PatternTapResponder userHandleTapAction = ^(NSString *tappedString){
NSLog(@"Username Handler Tapped = %@",tappedString);
};
[self.customLabel enableUserHandleDetectionWithAttributes:
@{NSForegroundColorAttributeName:[UIColor grayColor],RLHighlightedForegroundColorAttributeName:[UIColor greenColor],RLHighlightedBackgroundColorAttributeName:[UIColor blackColor],RLTapResponderAttributeName:userHandleTapAction}];
```

# Screenshots
<img src="https://cloud.githubusercontent.com/assets/3590619/7828584/f7ba853a-0452-11e5-9d6a-c9923d89ee8a.png" width="400" display="inline-block">
<img src="https://cloud.githubusercontent.com/assets/3590619/7828632/b0425196-0453-11e5-911a-79d56e7a8539.png" width="400" display="inline-block">
Expand Down
4 changes: 2 additions & 2 deletions ResponsiveLabel.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod:: Spec.new do |spec|
spec.platform = 'ios', '8.0'
spec.name = 'ResponsiveLabel'
spec.version = '1.0.1'
spec.version = '1.0.2'
spec.summary = 'A UILabel subclass which responds to touch on specified patterns and allows to set custom truncation token'
spec.author = {
'Susmita Horrow' => 'susmita.horrow@gmail.com'
Expand All @@ -10,7 +10,7 @@ Pod:: Spec.new do |spec|
spec.homepage = 'https://github.com/hsusmita/ResponsiveLabel'
spec.source = {
:git => 'https://github.com/hsusmita/ResponsiveLabel.git',
:tag => '1.0.1'
:tag => '1.0.2'
}
spec.ios.deployment_target = '8.0'
spec.source_files = 'ResponsiveLabel/ResponsiveLabel/Source/*'
Expand Down

0 comments on commit 754db1b

Please sign in to comment.