-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinitWith...FuckIt.h
114 lines (60 loc) · 1.93 KB
/
initWith...FuckIt.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#import <Foundation/NSAttributedString.h>
@interface NSAttributedString (FuckIt)
+ (instancetype):(NSString *)stringFormat, ...;
@end
#import <Foundation/NSIndexSet.h>
@interface NSIndexSet (FuckIt)
+ (instancetype):(NSUInteger)index;
+ (instancetype):(NSUInteger)index1 :(NSUInteger)index2;
+ (instancetype):(NSUInteger)index1 :(NSUInteger)index2 :(NSUInteger)index3;
@end
#import <Foundation/NSIndexPath.h>
@interface NSIndexPath (FuckIt)
+ (instancetype):(NSUInteger)row :(NSUInteger)section;
@end
#import <Foundation/NSString.h>
@interface NSString (FuckIt)
+ (instancetype):(NSString *)stringFormat, ...;
@end
#import <Foundation/NSURL.h>
@interface NSURL (FuckIt)
+ (instancetype):(NSString *)url;
@end
#if !TARGET_OS_IPHONE
#import <Foundation/NSTask.h>
@interface NSTask (FuckIt)
/**
You can pass a stringFormat or an array.
If you pass a string then we will split it on spaces to construct the
arguments array that NSTask requires.
A common trick to get around space problems is to set environment
variables. The shell will then insert them in a space-safe way.
*/
+ (instancetype):(id)stringFormatOrArray, ...;
@end
#else
#import <UIKit/UIAlertController.h>
@interface UIAlertController (FuckIt)
+ (instancetype):(id)titleOrError;
+ (instancetype):(NSString *)title :(id)message;
+ (instancetype):(NSString *)title :(id)message :(NSString *)cancelButtonText;
@end
#import <UIKit/UIImage.h>
@interface UIImage (FuckIt)
+ (instancetype):(NSString *)name;
@end
#import <UIKit/UILabel.h>
@interface UILabel (FuckIt)
+ (instancetype):(id)text;
+ (instancetype):(id)text :(UIFont *)font;
+ (instancetype):(id)text :(NSString *)fontName :(float)size;
@end
#import <UIKit/UIImageView.h>
@interface UIImageView (FuckIt)
+ (instancetype):(id)imageOrImageNameString;
@end
#import <UIKit/UIBarButtonItem.h>
@interface UIBarButtonItem (FuckIt)
+ (instancetype):(UIImage *)img target:(id)target :(SEL)selector;
@end
#endif