-
Notifications
You must be signed in to change notification settings - Fork 13
/
UIApplicationX.h
71 lines (52 loc) · 1.41 KB
/
UIApplicationX.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
//
// UIApplicationX.h
//
// Copyright (c) 2014 Anthony Shoumikhin. All rights reserved under MIT license.
// mailto:[email protected]
//
#import <UIKit/UIKit.h>
@interface UIApplication (X)
/**
Application's bundle identifier.
@return Application's bundle identifier.
*/
+ (NSString *)identifier;
/**
Application's bundle version.
@return Application's bundle version.
*/
+ (NSString *)version;
/**
Get application's frame regardless current orientation.
@return Frame of the main window.
*/
+ (CGRect)frame;
/**
Get application's status bar height.
@return Status bar current height.
*/
+ (CGFloat)statusBarHeight;
/**
Get stack backtrace.
@return Application's backtrace for current thread at place where this method is called.
*/
+ (NSArray *)backtrace;
/**
Call a phone number.
@param phoneNumber Phone number to call.
@param shouldReturn If YES then display a notification to return to this app.
*/
+ (void)call:(NSString *)phoneNumber andShowReturn:(BOOL)shouldReturn;
/**
Send an email.
@param address Email address.
@param shouldReturn If YES then display a notification to return to this app.
*/
+ (void)email:(NSString *)address andShowReturn:(BOOL)shouldReturn;
/**
Open URL in a default browser.
@param url URL to open.
@param shouldReturn If YES then display a notification to return to this app.
*/
+ (void)openURL:(NSURL *)url andShowReturn:(BOOL)shouldReturn;
@end