-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNSMutableAttributedString+Simple.h
51 lines (41 loc) · 1.88 KB
/
NSMutableAttributedString+Simple.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// NSMutableAttributedString+Simple.h
// reocar_ios
//
// Created by penoty yu on 09/08/2017.
// Copyright © 2017 reocar. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UIKit/UIKit.h"
#import <objc/runtime.h>
@interface NSString(Simple)
// string color
@property (nonatomic, copy) NSString * (^setColor)(UIColor *color);
@property (nonatomic, copy) NSString * (^setColorWithRGB)(NSInteger rgb);
@property (nonatomic, copy) UIColor * (^color)();
// string font
@property (nonatomic, copy) NSString * (^setFont)(UIFont *font);
@property (nonatomic, copy) NSString * (^setSystemFontSize)(CGFloat size);
@property (nonatomic, copy) NSString * (^setBoldSystemFontSize)(CGFloat size);
@property (nonatomic, copy) NSString * (^setFontNameAndSize)(NSString *name, CGFloat size);
@property (nonatomic, copy) UIFont * (^font)();
// string underline
@property (nonatomic, copy) NSString * (^setUnderlineStyle)(NSNumber * underlineStyle);
@property (nonatomic, copy) NSNumber * (^underlineStyle)();
@property (nonatomic, copy) NSString * (^setUnderlineColor)(UIColor *underlineColor);
@property (nonatomic, copy) UIColor * (^underlineColor)();
// string strikeline
@property (nonatomic, copy) NSString * (^setStrikelineStyle)(NSNumber * strikelineStyle);
@property (nonatomic, copy) NSNumber * (^strikelineStyle)();
@property (nonatomic, copy) NSString * (^setStrikelineColor)(UIColor *strikelineColor);
@property (nonatomic, copy) UIColor * (^strikelineColor)();
// string background color
@property (nonatomic, copy) NSString * (^setBackgroundColor)(UIColor *backgroundColor);
@property (nonatomic, copy) UIColor * (^backgroundColor)();
@end
@interface NSMutableString (Simple)
+ (instancetype)stringWithFormat:(NSString *)format strings:(NSArray *)strArray;
@end
@interface NSMutableAttributedString (Simple)
+ (instancetype)stringWithFormat:(NSString *)format strings:(NSArray *)strArray;
@end