I want to keep spacing between the UILables in landscape mode - uiscrollview

I want to keep spacing between the UILables in my Xcode project when i'm in landscape mode.
I have a scrollview with a few labels on it & it looks good in portrait mode but when im in landscape mode the labels are rising over each other & it looks bad.
Is there any way to keep perspectivlly the spaces between the labels on landscape?
Thanks!

Try playing with autoresizing masks on the labels. If that doesn't work just reposition the labels from the viewcontroller whenever you get the rotation events.

Related

How do you 'Vary for Traits' when wR and hR are the same in both portrait and landscape?

I am building a Launch Storyboard for iOS 13 compliance.
I am constructing the 'splash screen' from several images. It's the last one that's the problem.
To get the scale right in Portrait, I select the device range (iPad), and portrait, then click 'Vary for Traits' (all before any constraints have been placed on the ImageView)
After I make all the constraints to get it looking right on all iPad devices in portrait mode, I deselect 'Vary for Traits' and then change orientation.
Now the UIImageView is incorrect (rightly so) and so I click 'Vary for Traits' and set all the constraints to get it looking right for landscape.
Then I deselect 'Vary for Traits' and click on Portrait - but now all the portrait constraints are conforming to the landscape ones.
The problem, as I can see is that for all the iPad devices, they have the same wR and hR regardless of Landscape or Portrait...
Is there a way I can still have different constraints depending on orientation? Or am I going to have to do all this in code?
For what it's worth to others, I managed to get an acceptable compromise, buy removing some text from the central image and replacing it with UILabels that I could better 'scale'.
I also used different constraints (where previously I was keeping the main image and title / logo centred H/V with equal width/height to the background and then using the multiply to scale it) I changed them to having all edges 0 to the overall superview and then using the constants to move the top or left and right to get the 'scale' I needed.
It's now looking pretty good in all devices and orientations.
Thanks to everyone who helped.

Change Background Color of Full Screen Application- Xcode

Good Afternoon helpful people!
I'm building a mac app that displays images. The app will be in fullscreen mode 100% of the time it is running.
My issue is that the images I am displaying do not fill the entire screen, therefore, showing a grayish background. Is there anyway to change this background color to Black? Or maybe it's the NSImageView that needs the background color changed?
I do not see anywhere in my Xcode Attributes Inspector to change color.
Thanks!
The solution to this is, in my case, to add an NSBox in storyboard and set its constraints so that it ALWAYS fills the view. Once you have done this, go to the Atrributes Inspector and change its Fill Color to your desired color.
The important part here is the constraints. Set Top, Bottom, Left, and Right space to 0. Hope that makes sense, i'm new to constraints.

iOS 8 UISplitViewController details view resizing incorrectly when rotating to landscape and overlay visible

Got another issue with UISplitViewContoller on iOS 8.
When in portrait, and the displayMode is UISplitViewControllerDisplayModePrimaryOverlay, when you rotate to landscape the secondary view controller's view doesn't resize correctly during the rotation animation. Once the rotation is done, the size is adjusted to fit the screen space and it snaps into place which is quite jarring.
However, if the display mode is UISplitViewControllerDisplayModePrimaryHidden when the rotation occurs, the secondary view's size is adjusted during the rotation animation and everything looks and works as expected.
This occurs even with the out of the box Master-Detail template project from Xcode 6.1.
Any thoughts on how to get the secondary controller's view to size correctly during the animation when the primary overlay is visible?

An easy way of setting a ZPL template as landscape rather than portrait?

Is there a simple way of setting an entire label to print in landscape orientation rather than portrait? I tried the FWR method but it doesn't seem to affect it at all.
I get the feeling i'm going to have to completely realign my fields and graphic boxes if i want to make it landscape.
^FWr command changes orientation of a field.
If you want to set whole label orientation, use ^POa instead, like described e.g. in Label Rotation and Orientation for ZPL based Desktop and Tabletop Printers document.
The ^PO command will only allow you to rotate in 180 degree increments, so that will not help you here.
Unfortunately, the answer to your question is "No." In order to switch between landscape and portrait modes, you will need to manually rotate/reposition/realign all your graphic boxes, text fields, and barcodes. (I feel your pain though, I've had to do this before and it is not fun.)

UITableView won't scroll on iPad, but does on iPhone

If I turn my iPad to landscape a couple of row of table view (and the footer) are just off the bottom of the screen although it fits in portrait.
My problem is that when I use my finger to "pull" view port up to see the material off the bottom I can see it while I keep my finger in place, but when I remove the finger, the viewport drops down again and the material at the bottom disappears.
Same code scrolls fine on iPhone (fonts are too big and so on but that is a different issue)
What am I doing wrong?
Peter
As for what exactly your doing wrong... we can't see your code so we can't tell you. But shed some light on what is happening.
A UITableView is a UIScrollView and how far you can scroll is based on the size view (think frame) compared to the size(CGSize) of the content(contentSize) of the UIScrollView. If the 'frame' is bigger than the contentSize then no scrolling is needed, but if the content is larger, then you can scroll by the difference between the two.
In short, the contentSize of your UITableView is incorrect. This can be caused numerous ways, including auto-resizing on device rotations, dynamically changing table/footer heights without updating the table, etc.

Resources