-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathCXAHyperlinkLabel.h
More file actions
29 lines (22 loc) · 1 KB
/
CXAHyperlinkLabel.h
File metadata and controls
29 lines (22 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// CXAHyperlinkLabel.h
// CXAHyperlinkLabelDemo
//
// Created by Chen Xian'an on 1/3/13.
// Copyright (c) 2013 lazyapps. All rights reserved.
//
#import <UIKit/UIKit.h>
@class CXAHyperlinkLabel;
// The URL may be broken into 2 or more lines, that's why CXAHyperlinkLabel provide textRects but not textRect
typedef void (^CXAHyperlinkLabelURLHandler)(CXAHyperlinkLabel *label, NSURL *URL, NSRange textRange, NSArray *textRects);
@interface CXAHyperlinkLabel : UILabel
@property (nonatomic, copy) CXAHyperlinkLabelURLHandler URLClickHandler;
@property (nonatomic, copy) CXAHyperlinkLabelURLHandler URLLongPressHandler;
@property (nonatomic, strong) NSDictionary *linkAttributesWhenTouching;
@property (nonatomic, strong) UIColor *underlineColor;
- (void)setURL:(NSURL *)URL forRange:(NSRange)range;
- (void)setURLs:(NSArray *)URLs forRanges:(NSArray *)ranges;
- (void)removeURLForRange:(NSRange)range;
- (void)removeAllURLs;
- (NSURL *)URLAtPoint:(CGPoint)point effectiveRange:(NSRangePointer)effectiveRange;
@end