Skip to content

Commit 701f5c3

Browse files
committed
Updated read me file
1 parent 00773f8 commit 701f5c3

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,19 @@ NSLog(@"URL Tapped = %@",tappedString);
7979
@{NSForegroundColorAttributeName:[UIColor cyanColor],NSUnderlineStyleAttributeName:[NSNumber
8080
numberWithInt:1],RLTapResponderAttributeName:urlTapAction}];
8181
```
82+
#### Highlight Patterns On Tap
83+
To highlight patterns, one can set the attributes:
84+
* RLHighlightedForegroundColorAttributeName
85+
* RLHighlightedBackgroundColorAttributeName
8286

87+
```
88+
self.customLabel.userInteractionEnabled = YES;
89+
PatternTapResponder userHandleTapAction = ^(NSString *tappedString){
90+
NSLog(@"Username Handler Tapped = %@",tappedString);
91+
};
92+
[self.customLabel enableUserHandleDetectionWithAttributes:
93+
@{NSForegroundColorAttributeName:[UIColor grayColor],RLHighlightedForegroundColorAttributeName:[UIColor greenColor],RLHighlightedBackgroundColorAttributeName:[UIColor blackColor],RLTapResponderAttributeName:userHandleTapAction}];
94+
```
8395
#### Custom Truncation Token
8496
##### Set attributed string as truncation token
8597
```
@@ -92,6 +104,7 @@ NSLog(@"Tap on truncation text");
92104
[self.customLabel setText:str withTruncation:YES];
93105
```
94106
##### Set image as truncation token
107+
The height of image size should be approximately equal to or less than the font height. Otherwise the image will not be rendered properly
95108
```
96109
[self.customLabel setTruncationIndicatorImage:[UIImage imageNamed:@"more_image"] withSize:CGSizeMake(25, 5) andAction:^(NSString *tappedString) {
97110
NSLog(@"tapped on image");
@@ -100,20 +113,6 @@ NSLog(@"Tap on truncation text");
100113
##### Set from interface builder
101114
<img src="https://cloud.githubusercontent.com/assets/3590619/8694465/df3c1bce-2afc-11e5-9409-78e82e1f294c.png" display="inline-block">
102115

103-
#### Highlight Patterns On Tap
104-
To highlight patterns, one can set the attributes:
105-
* RLHighlightedForegroundColorAttributeName
106-
* RLHighlightedBackgroundColorAttributeName
107-
108-
```
109-
self.customLabel.userInteractionEnabled = YES;
110-
PatternTapResponder userHandleTapAction = ^(NSString *tappedString){
111-
NSLog(@"Username Handler Tapped = %@",tappedString);
112-
};
113-
[self.customLabel enableUserHandleDetectionWithAttributes:
114-
@{NSForegroundColorAttributeName:[UIColor grayColor],RLHighlightedForegroundColorAttributeName:[UIColor greenColor],RLHighlightedBackgroundColorAttributeName:[UIColor blackColor],RLTapResponderAttributeName:userHandleTapAction}];
115-
```
116-
117116
# Screenshots
118117
<img src="https://cloud.githubusercontent.com/assets/3590619/7828584/f7ba853a-0452-11e5-9d6a-c9923d89ee8a.png" width="400" display="inline-block">
119118
<img src="https://cloud.githubusercontent.com/assets/3590619/7828632/b0425196-0453-11e5-911a-79d56e7a8539.png" width="400" display="inline-block">

ResponsiveLabel/ResponsiveLabel/Source/InlineTextAttachment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// InlineTextAttachment.h
33
// ResponsiveLabel
44
//
5-
// Created by sah-fueled on 21/07/15.
5+
// Created by hsusmita on 21/07/15.
66
// Copyright (c) 2015 hsusmita.com. All rights reserved.
77
//
88

ResponsiveLabel/ResponsiveLabel/Source/InlineTextAttachment.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
// InlineTextAttachment.m
33
// ResponsiveLabel
44
//
5-
// Created by sah-fueled on 21/07/15.
5+
// Created by hsusmita on 21/07/15.
66
// Copyright (c) 2015 hsusmita.com. All rights reserved.
77
//
88

99
#import "InlineTextAttachment.h"
1010

1111
@interface InlineTextAttachment()
1212

13-
1413
@end
1514

1615
@implementation InlineTextAttachment

ResponsiveLabel/ResponsiveLabel/Source/ResponsiveLabel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ IB_DESIGNABLE
4444

4545
/** Method to set an image as truncation indicator
4646
@param image: UIImage
47-
@param size: CGSize : The height of image size should be approximately equal to or less than the font height. Otherwise the image will rendered properly
47+
@param size: CGSize : The height of image size should be approximately equal to or less than the font height. Otherwise the image will not be rendered properly
4848
@param action:PatternTapResponder Action to be performed on tap on the image
4949
*/
5050

0 commit comments

Comments
 (0)