iPad Corner Radius Where App Meets Status Bar - ios

I am trying to make some custom art for my app that will be shown at the top of the app, right up against the status bar.
In order to make the art look good, I would like to know what the corner radius is for the part of the app illustrated below:
I would like to know what the radius is that iOS makes your app fit into.
Thanks,
Erway Software

It's about 4.5. I took a screenshot of the simulator, zoomed in about 2000% and compared various values to dial it in.
If you're making a UIView in the Interface Builder and specifying the layer.cornerRadius in the User Defined Runtime Attributes, a value of 5 is more than close enough.

Related

How should I change my OpenGL app to use the iOS 11 safe area?

I maintain an OpenGL app that's been running on iOS since 2010. It uses the full screen and hides the status bar. It launches without any .nib file and creates an OpenGL view & controller that, in turn, displays all app content.
What changes do I need to make so the app will work on iPhone X using the new 'safe area' layout design? Presumably the only real change is just creating my "EAGL" surface/view with the same dimensions and location as the safe area instead of the entire screen?
How you respect the safe area in a "fullscreen" app (like most GL, Metal, etc games) is really two questions: one of design, and one of implementation. (But it's easier to tackle them in the reverse of that order, so here goes...)
Making fullscreen OpenGL views
If you have a fullscreen view (e.g. the window's root view controller) and you just set its layerClass to CAEAGLLayer (as is par for the course in most OpenGL ES work), you get a view that covers the entire 1125 x 2436 rectangle of the iPhone X screen. (Be sure to set the scale, too, so you actually get all those pixels... 375 x 812 # 1x scale probably looks hideous on that screen.)
That's probably the user experience you want for your app/game (and it's the one Apple encourages)... your 3D content extends all the way to the edges of the screen, around the curves at the bottom and the 🤘 at the top. That makes a much nicer UX than leaving black borders around all your content.
Designing fullscreen content for iPhone X
On the other hand, the existing design of how your OpenGL content appears may or may not fit well with the curiously shaped screen of iPhone X. If you have anything along the very top that the user is expected to see, it'll be obscured behind the camera/sensor/speaker cutout. Similarly, if you have anything important at the bottom, its edges will be cut off behind the curved corners.
In that case, you'll want to leave the unimportant parts of your fullscreen content (like a game's view of a 3D gameplay world) fullscreen, but inset any important content like UI overlays or interactive 3D elements. As for how you might do that, there's a couple of feasible approaches, with tradeoffs:
Hard-code the iPhone X obstruction dimensions, detect when you're running on iPhone X, and fix your layout accordingly. This is straightforward, but not robust. If Apple decides to change the way software UI elements around screen edges (like the swipe-to-home indicator) work, or makes iPhone XI (or X2? or XX?) next year with a slightly different shape, you'll need to update again to adapt.
Use the Safe Area guides even though you're not using UIKit or Auto Layout to draw/position onscreen content. Ask the view for its safeAreaLayoutGuide and convert that guide's bounds to whatever coordinate system you use for positioning the content you draw with OpenGL. This is a little more work, but it ensures that your app is ready for any curveballs Apple throws in the future.
One more thing...
It uses the full screen and hides the status bar.
When designing for iPhone X, it's worth rethinking whether a "fullscreen" app should hide the status bar. On other iOS devices, showing the status bar means taking away useful space from your app's content. But on iPhone X, most apps don't have anything useful they can do with those "devil horn" corners anyway — your user might appreciate still being able to see the clock, battery, etc.

How can I get a [Glance] Interface Controller / blank slate for Apple Watch?

In the default storyboard for an Apple Watch application, the Interface Controller has a black rectangle at the top with the time, and the Glance Interface Controller has two Groups.
I would like for both to have the viewport completely covered by my imagery, with a background image that exactly fits the Apple Watch viewport, and a UIImageView portraying a partially transparent PNG, rotated and translated.
I've so far tried and failed to find out how to manipulate XCode's UI to delete e.g. the two Groups in the Glance image.
Is fully covering the viewport available for Glances and/or the main interface, and if so, how?
Thanks,
If I remember correctly this is not possible since all glances should basically provide some similar structure.

Can I add button on Map in watchkit?

I'm trying to build an app for Apple Watch OS 2, so I was wondering is it possible to add buttons or images on top of the map?
As far as I know, there isn't such a thing like "multiple layers", as you might call it, which would allow you to arrange a thing on top of another thing, in WatchOS yet.
So, I don't think, that the thing you want would work, sorry.
You would need to do your own tile rendering to do something like that. I have four buttons over the top of my maps and I render custom waypoints and routes on the map. To do that I have a custom tile render that generates an image that I set for the watch background and then I overlay buttons on top of it. Here is some more info on how I overlay the buttons Is it possible to position views on top of each other. (One thing that has changed since that post is that I no longer break the background up into four images, I can just set the background as a single image. Somehow I missed that when I initially read the API docs. Also, I turned off the animations for watchOS 1 and I have them on for watchOS 2.)

Qt screen orientation change

I'm using Qt 5.1 beta on iOS. I am deploying my app on an ipad.
The problems I am having regard how touch events are sensed and processed by qt. As long as I keep the ipad oriented straight (i.e. frontal camera is up), everything works fine. In that configuration, if I touch the screen, the coordinates of the point of touch sensed through mousePressedEvent(QMouseEvent *e) indicates that, as expected, the origin of the coordinate system is in the upper left corner of the screen.
When I turn my ipad, let's say left, so that the camera is to the left, my ui correctly rotates so that the buttons that I have are aligned to the screen. However, if I sense the touch events as described above, the origin of the coordinate system has not changed, so now it is in the lower left corner of the screen. Because of this, the buttons act as if they were not aligned to the screen but as if they turned around the same way I turned the screen (even if they are rendered aligned) So, if I tap on the visualized button it won't sense the touch, but it will if I tap were they would be if they would have not changed orientation as the screen did.
Does anyone have any idea what might cause this or how it could be fixed?
Please ask if you would like to see code. I did not put any as I would not know what might be of interest and my app is quite big already.
Thanks,
Corneliu
You file a bug report to the trolls about it. And also check to see if there is a bug report about it already.
http://bugreports.qt-project.org/
For the mean time you could push your coordinates through a mapping function of some sort based on the orientation of the device.
Also calling 'adjustSize()` on widgets tends to fix sizing and positioning with layouts.
Hope that helps.

How does one eliminate the rounded corners on the main window on an iPad app?

I have seen some iPad apps that fill the screen (e.g. Stanza) or have squared off corners under the status bar (e.g. the iPod player has square corners at the top; can't tell at the bottom). Anyone know how this is done?
It seems that, by default, the top-level UIWindow has a clipping region applied, as any subviews I place in that window get clipped off in those corners. If that is the case, is there a way to get rid of this? BTW, the clipping only seems to be there on the iPad, not on my iPod Touch (at least, not in the older OS version I'm running on there).
Following up: I even created the UIWindow programmatically and then set its background to a solid color and the rounded corners are still there, confirming that the clipping is either on the UIWindow or something even higher up.
(e.g. the iPod player has square corners at the top; can't tell at the bottom)
You'll need to get used to this: Apple apps will do things your apps can't do. Apple get to use private frameworks, App Store apps don't.
If you don't use the status bar (ie, completely 'full screen') you'll get a 'non rounded' screen. This is pretty simple to do - just hide the status bar from within your code (or, if you want it hidden throughout your app, you can just set it in your info.plist).

Resources