forked from mysterioustrousers/MTStringAttributes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMTStringParser.h
More file actions
45 lines (27 loc) · 1.02 KB
/
Copy pathMTStringParser.h
File metadata and controls
45 lines (27 loc) · 1.02 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// MTString.h
// MTStringAttributes
//
// Created by Adam Kirk on 2/12/13.
// Copyright (c) 2013 Mysterious Trousers. All rights reserved.
//
#import "MTStringAttributes.h"
@interface MTStringParser : NSObject
+ (MTStringParser *)sharedParser;
#pragma mark - Set Styles
- (void)setDefaultAttributes:(MTStringAttributes *)attributes;
- (void)setAttributes:(MTStringAttributes *)attributes forTag:(NSString *)tag;
#pragma mark - Convenience
- (void)addStyleWithTagName:(NSString *)tagName font:(id)font;
- (void)addStyleWithTagName:(NSString *)tagName
font:(id)font
color:(id)color;
- (void)addStyleWithTagName:(NSString *)tagName
font:(id)font
color:(id)color
backgroundColor:(id)backgroundColor
strikethrough:(BOOL)strikethrough
underline:(BOOL)underline;
#pragma mark - Parse Markup To Attributed String
- (NSAttributedString *)attributedStringFromMarkup:(NSString *)markup;
@end