A UIScreen object contains the bounding rectangle of the device’s entire screen. When setting up your application’s user interface, you should use the properties of this object to get the recommended frame rectangles for your application’s window.
Questions tagged [uiscreen]
153 questions
11
votes
4 answers
How to get iPhone screen size programmatically?
Possible Duplicate:
How to get screen size using code?
NSLog(@"Top Left View : Width %f height%f",self.topLeftView.frame.size.width,self.topLeftView.frame.size.height);
I have dragged the "View" from object library and put it on xib file.
But…

bhavya kothari
- 7,484
- 4
- 27
- 53
8
votes
4 answers
How to disable screen Recording in iOS app
Is there any way to disable the screen recording? or is is possible through a configuration profile? or any third party library is available?

Alok Maurya
- 127
- 1
- 2
- 9
8
votes
2 answers
Adding a CarPlay UI
I am working on my current iPhone audio app to be supported in CarPlay. I already got approved by Apple and received the development entitlement, and watched the video "Enabling Your App for…

stspb
- 193
- 2
- 12
8
votes
4 answers
How to force TV out of iPad to be in Landscape mode even if iPad is in portrait mode
I am using HDMI cable to take output of my iPad screen to a TV.
if i keep the iPad in landscape mode the output on TV shows in landscape mode. and if i rotate it to portrait output on TV changes to portrait mode also.
Is there a way to restrict this…

Dev_Dash
- 376
- 3
- 7
7
votes
1 answer
iOS9 covering status bar with custom uiwindow - wrong position
I am trying to cover status bar with my own view and to do that I calculcate frame for my view by doing something like that (also after rotation):
UIScreen *screen = [UIScreen mainScreen];
CGRect statusBarFrame = [UIApplication…

Artrmz
- 340
- 2
- 14
7
votes
1 answer
snapshotViewAfterScreenUpdates on UIScreen gives blank snapshot on device
I'm trying to get an image of the entire screen as the user sees it. The following code should work however it will only work in the simulator. What do I have to do to get this to work on a device running iOS 8.1?
UIView *snapshot = [[UIScreen…

Kieran Harper
- 1,098
- 11
- 22
6
votes
2 answers
UIScreen Brightness Property
At the moment I'm trying to create an application to adjust the device's brightness. In iOS5, there is the new brightness property for mainScreen that allows you to set the screen brightness. I'm using the following code:
[[UIScreen mainScreen]…

ac3xx
- 63
- 1
- 5
6
votes
1 answer
iPad: [UIScreen mainScreen].bounds returns wrong co-ordinates
[UIScreen mainScreen].bounds returns (0,0,768,1024) even when the iPad is in Landscape mode.
It should return (0,0,1024,768) but instead it returns (0,0,768,1024).
What could be wrong?

Parth Bhatt
- 19,381
- 28
- 133
- 216
6
votes
1 answer
When would [UIScreen screens] return an empty array
I'm seeing odd behavior from [UIScreen screens] in iOS 5.0.1 in reports we log to Flurry on crashes. There are times when [UIScreen screens] will return an empty array. Our app implements support for external accessories through the EAAccessory…

David Potter
- 2,272
- 2
- 22
- 35
5
votes
1 answer
iOS 11 Screen Record disable VIDEO RECORDING
iOS 11 has new feature which enables users to record their screen, I want to disable only VIDEO recording when i am playing video in my application keeping screen record enabled.
For example. I am recording my screen and open my application start…

Shuja Ud Din
- 434
- 5
- 17
5
votes
1 answer
iOS - Wrong UIScreen bounds in viewWillTransition for iPad
I have to check if my device has changed orientation in iOS 8+.
My approach is:
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
…

Marco Santarossa
- 4,058
- 1
- 29
- 49
5
votes
2 answers
How secure is off-screen information?
My iOS app has a lock screen which, when enabled, covers the whole of UIScreen. However, outside of the UIScreen bounds, I have panes with sensitive information that are no covered by the lock screen. (Those panes can be swiped in and out when the…

Randomblue
- 112,777
- 145
- 353
- 547
5
votes
2 answers
Does iOS send notifications when the system changes the screen brightness?
Problem is, my reading app has a button that puts it into dark theme mode. The brightness gets reduced by 10%. When the user returns to the normal mode, it is set back to the remembered brightness. But in the meantime the actual system brightness…

openfrog
- 40,201
- 65
- 225
- 373
5
votes
2 answers
iOS: Programmatically creating UIWindow results in wrong position
In iOS 5.1.1, I have found that if I create my UIWindow (I'm tired of IB), and set its frame to [UIScreen mainScreen].bounds, the window shows up under the status bar. However if I do the same thing is iOS 6, it appears in the right spot just below…

RRR
- 51
- 1
- 2
5
votes
1 answer
iPhone 5 [[UIScreen mainScreen] bounds].size.height
Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?
How to deal with iPhone 5 screen size?
What to check in order to support the iPhone 5's longer screen?
With the new screen size on iPhone 5, anyone know or guess…

johnbakers
- 24,158
- 24
- 130
- 258