Questions tagged [uiscreen]

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.

153 questions
0
votes
2 answers

How to tell the difference between iPhone 5s/5 and 6 in the Xcode simulator

I've been trying to figure this out for the past few days but keep on getting the same screen size for iPhone 5,5s and 6.--> Height -1136 Width 640. How do I tell the difference between these two devices? Is it the simulator? Do I have to be…
uplearned.com
  • 3,393
  • 5
  • 44
  • 59
0
votes
4 answers

UIScreen.mainScreen is the same size on all devices

I have a weird issue which suddenly appeared. The problem is that my app seems to be scaling my views, when changing device from iPhone 6 to iPhone 6 Plus for instance. So if I have a title with a certain font size the same title with take up the…
Mattias Farnemyhr
  • 4,148
  • 3
  • 28
  • 49
0
votes
1 answer

UIScreen mainScreen bounds different between simulator and actual device on iOS8

in my iOS7 app I use: screenRect = [[UIScreen mainScreen] bounds]; screenWidth = screenRect.size.width; screenHeight = screenRect.size.height; I then use screenHeight for loading different view regarding if device is iPhone 4 or iPhone 5. The main…
Matej Zimic
  • 73
  • 1
  • 6
0
votes
2 answers

iOS 8 screen bounds different on device and simulator in landscape orientation

I have an app that runs in landscape orientation. I have used the code below to make it work on iOS 8. This code works perfectly on the simulator for ALL devices. However, when I run it on an iPhone 5 device the layout is wrong. Having read some…
0
votes
2 answers

Window for an External Display affects primary screen

I create a new window when there is an additional screen (up to 2). Each window shows a different content, in a different screen. The problem is under iOS7: Creating and showing this external window makes the status bar visible in the first one,…
subzero
  • 3,420
  • 5
  • 31
  • 40
0
votes
1 answer

Second UIScreen causing problems with UIStoryboards

In my app delegate i set up another screen (for airPlay). When i create a second window and assign the Second screen to it and run the app the TableView in my storyboard turns to a black colour. Its as if the tableView is not rendering correctly. I…
BigAl
  • 139
  • 1
  • 8
0
votes
1 answer

How to fix my [UIScreen mainscreen] recognizing iPhone 5 as iPhone 4

I have an iPhone 5 and an iPhone 4s that I am testing an xcode project on. I deleted my app on the iPhone 5 and re-built it and now it recognizes the iphone 5 as an iphone 4. I have tried both if (UI_USER_INTERFACE_IDIOM() ==…
Josh Wang
  • 315
  • 1
  • 4
  • 10
0
votes
2 answers

how to make the UIScreen bounds landscape in iphone app

I am making subView on the main view it works fine but problem is that when i add any thing in it it takes portrait bounds though my app is landscape mode i want in landscape mode. here is my code backgroundViewBounds= [[UIScreen mainScreen]…
Jan Developer
  • 45
  • 1
  • 1
  • 5
0
votes
1 answer

Keep UIWindow size after setting it's UIScreen value

I'm using AirPlay, the primary content of the iPad is beamed to the AppleTV fine. When I want different information on the iPad than is on the AppleTV, I'm getting resolution issues. I instantiate the UIWindow: _atvWindow = [[UIWindow alloc]…
chillok
  • 235
  • 1
  • 3
  • 11
0
votes
1 answer

Creating logic to handle view/button sizes

I would like to create some logic to handle the view sizes for a subview and some buttons, based on the mainscreen size. So I would like to do something like this: //Discover the main screen size (which would be different depending on the…
StuartM
  • 6,743
  • 18
  • 84
  • 160
0
votes
2 answers

Can a gesture recogniser control iOS display brightness?

I'd like to let the user control the brightness in an iOS app using a gesture recogniser to swipe up and down. Can gestures even control brightness? I've done it before using a slider and the brightness property of UIScreen... [UIScreen…
Ben
  • 65
  • 2
  • 6
0
votes
2 answers

Dim iPhone back light on upside down

I have seen on an iOS application 'Sleep Cycle Alarm Clock' that when the iPhone is facing screen down (towards the floor) they have managed to dim the back light of the screen. I have been searching all over the internet and can't find the API that…
Adam Waite
  • 19,175
  • 22
  • 126
  • 148
0
votes
1 answer

uiscreen brightness beyond maximum value

I know it's possible to change the brightness of the iphone screen through code with [[UIScreen mainScreen] setBrightness:1.0]; but I wonder if it's possible to go beyond the maximum brightness level which is set in iPhone, and make the screen even…
Prastow
  • 178
  • 1
  • 19
0
votes
1 answer

iOS Second Display

I do not get the Second Display to Show any other then Mirroring my Device Screen. I allways see only the mirrored device screen on my tv. This is My Code i hope someone can help me. - (BOOL)application:(UIApplication *)application…
0
votes
1 answer

How do I find out the screen orientation, in portrait or landscape?

I can't believe this isn't possible. It's just one of those things that surely everyone must require. So, this: [UIScreen currentScreen] bounds]; returns a width of 320 on my iPhone, regardless of whether the phone is in portrait or landscape. So I…
Andrew
  • 15,935
  • 28
  • 121
  • 203
1 2 3
10
11