-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNSAttributedString+Convenience.h
34 lines (24 loc) · 1.11 KB
/
NSAttributedString+Convenience.h
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
//
// NSAttributedString+Convenience.h
// Ringtonic
//
// Created by Alexander Ivanov on 30.04.17.
// Copyright © 2017 Alexander Ivanov. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "NSObject+Convenience.h"
@interface NSAttributedString (Convenience)
- (NSAttributedString *)font:(UIFont *)font forRange:(NSRange)range;
- (NSAttributedString *)font:(UIFont *)font;
- (NSAttributedString *)strikethrough:(NSNumber *)styleAndPattern forRange:(NSRange)range;
- (NSAttributedString *)strikethrough:(NSRange)range;
- (NSAttributedString *)strikethrough;
- (NSAttributedString *)underline:(NSNumber *)styleAndPattern forRange:(NSRange)range;
- (NSAttributedString *)underline:(NSRange)range;
- (NSAttributedString *)underline;
+ (instancetype)attributedStringWithString:(NSString *)str attributes:(NSDictionary<NSString *, id> *)attrs;
+ (instancetype)attributedStringWithString:(NSString *)str;
+ (instancetype)attributedStringWithHTMLString:(NSString *)htmlString encoding:(NSStringEncoding)encoding;
+ (instancetype)attributedStringWithHTMLString:(NSString *)htmlString;
@end