forked from soffes/sstoolkit
/
UIScreen+SSToolkitAdditions.h
51 lines (37 loc) · 1.16 KB
/
UIScreen+SSToolkitAdditions.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
//
// UIScreen+SSToolkitAdditions.h
// SSToolkit
//
// Created by Sam Soffes on 2/4/11.
// Copyright 2011 Sam Soffes. All rights reserved.
//
/**
Provides extensions to `UIScreen` for various common tasks.
*/
@interface UIScreen (SSToolkitAdditions)
///---------------------------
/// @name Accessing the Bounds
///---------------------------
/**
Returns the bounds of the screen for the current device orientation.
@return A rect indicating the bounds of the screen.
@see boundsForOrientation:
*/
- (CGRect)currentBounds;
/**
Returns the bounds of the screen for a given device orientation. `UIScreen`'s `bounds` method always returns the bounds
of the screen of it in the portrait orientation.
@param orientation The orientation to get the screen's bounds.
@return A rect indicating the bounds of the screen.
@see currentBounds
*/
- (CGRect)boundsForOrientation:(UIInterfaceOrientation)orientation;
///------------------------
/// @name Screen Attributes
///------------------------
/**
Returns a Boolean indicating if the screen is a Retina display.
@return A Boolean indicating if the screen is a Retina display.
*/
- (BOOL)isRetinaDisplay;
@end