How to resize SKScene in editor? - ios

I've designed an SKScene for iPhone 4S in landscape (960x640)
I now want to use the same scene on iPhone 5, 6 etc
Is there any way to "easily" adapt this scene? I mean in a way similar to AutoLayout for Storyboards.
I don't want to have to copy this scene for each size and move everything again manually.
The Scale Mode is Aspect Fit, but that doesn't use the whole screen. Aspect Fill causes some sprites to be partially off-screen.

Related

iOS, launch screen image same proportional size on different devices without blurring?

I want have an image on my launch screen which occupies the same amount of the screen on different devices.
At the moment I have a logo which is about the right size on iPhone 4s, but on iPhone 6 Plus it's too small. Obviously these devices are in the same autolayout class.
I know I could use proportional sizing, but this will stretch the images and make them look fuzzy.
Also with it being a launch screen I can't use code for drawing or custom controls.
I guess I need some way to determine different devices in my constraints.
Add LaunchScreen asset group to your Assets. Then it will be possible to assign custom image for each screen resolution.

How to make circles stay circles and resize on different screen sizes?

I really need help, I made an app I designed everything for iphone 7 I designed it with constraints and now I am having a problem because they don't look right on SE or 4s.
I am using circles made with IBDesignables(using cornerRadius to make circles). I want them when it resizes to stay circles because I tried couple of things and when it resizes its not a circle anymore.
Sorry for the long paragraph I just really need a tip !
How can I solve this problem
Here is how it looks on Iphone 7
Here is how it looks on Iphone SE
Here is how it looks on Iphone 4s
If you want to keep that all view stay circle for all device you must keep their height and width same.
You can easily do this thing with Autolayout set Aspect ratio of that view is 1 so their height and width remain same check screen shot

Xcode interface builder aspect ratio auto layout all iphones

I read as much as I can of auto-layout tutorials but I cannot figured out how I can have my UIView (UIWebView for that specific example) resize to the screen layout of my phone.
My background is an UIImageView, proportionally bigger on iPhone5, and iPhone6 and iPhone6 plus .
I want to have my UIWebview to get the margin keeping the aspect ratio.
I tried several options (I also enabled size classes option - I did not see any difference on the preview...)
Anyone as a clue on that ?
It looks like you're not getting any answers here, and I'm not sure I can help, either; but, I'd like to try by offering what I've done with respect to maintaining the aspect ratio of a given view containing a video, no matter whether the iPhone orientation is portrait or landscape.
In my storyboard, I've accounted for occasions in which the aspect ratio is reversed, in that all videos are either 16:9 or 9:16, but which one depends on how the camera was held during recording:
So, here is a screen shot of an iPhone displaying a 16:9 (wide) video in portrait:
Here is the same video (wide) in landscape (ignore the overlapping labels; the Core Data section is meant to be hidden or overlapped by the AVPlayer view, so that users can view the video fullscreen by simply rotating the iPhone):
Here are the opposites, first:
And, second:
These run the gamut of possibilities for maintaining aspect ratio, regardless of a portrait or landscape orientation, and regardless of a horizontal or vertical aspect ratio. Therefore, you should be able to derive a solution from it. Hope this helps!

Same button position in relation to iPhone 5/6/6+ screen resolution in Xcode 6

I'm coding a remote control with a background (designed in Photoshop) already for the iPhone 6+ with the proper resolution, which I use with an UIImageView at full size.
I disabled Autolayout/Size Classes and set the size to Inferred. Further I uploaded all relevant LaunchImages for proper scaling.
The UIImageView scales properly for all screen sizes, but the buttons I put over the background are moving.
For example:
All buttons (over 1-9, Power Off, Menu ecc.) should always stay at the same position (in releation to the selected device and screen resolution).
I can't get it, that all buttons stay over the designed photoshop elements.
Please give me a good advice, to solve this issue.
I would recommend using size classes and Autolayout. This type of thing is exactly what they are made for.
This youtube video is a great introduction to size classes and some Autolayout:
https://www.youtube.com/watch?v=IwSTXY0awng&feature=youtu.be

Developing for IPhone 4s, 5, 6 and 6+

I've been working on a specific app for a while now and everything was good. But upon all this news of the iPhone 6 and the new Xcode, everything has just become confusing. Using Auto layout and designing for the iPhone have just become the most complicated thing to do. Every time I add constraints my images just triple in size. When all I want is to resize them to fit rationally across all the iPhone platforms(In portrait mode). For example I would like for certain images to grow as I work From the iPhone 5 to the 6+. Does any one know how to do this?
What do you mean triple in size?
Easiest way to have an image view scale is do the following:
Add it as a subview to the view of your view controller
Pin it at the top, left and right, leaving height unconstrained
Add an aspect ratio constraint, so that it can automatically calculate its height based on the width it gets

Resources