iPhone retina display with kobold2d - kobold2d

I recently upgraded to an iPhone retina display i.e., iPhone 5 and I am executing sample parallax background images; these images are positioned adjacent to each other in order to achieve endless scrolling... on the retina display i am witnessing a gap between the images and i am not seeing this gap when executing on the iPhone 4. I read somewhere that KOBOLD 2.0.4 resolves this issue but it's unclear if i'm missing some instructions in the code to achieve this. Also, i am using the templates provided by KOBOLD 2.0.4.
Thanks in advance...

If you are repositioning images once they are off the screen to achieve the endless effect you could be using images fitting iPhone 4 screen, and repositioning them once their position is outside the screen. That would result in a gap till the image is fully out of the screen on left end(or right).
If this is your case, there are 2 ways to fix it
Use 3 images in a row instead of 2, and position the image leaving the screen behind the last one.
Make iPhone 5 screen size background images.

Related

Managing iPhone 5 and iPhone 6 image sizes

I am new to programming and Xcode and struggling with setting image size for iPhone 5 and iPhone 6. Apparently both iPhone 5 and 6 use the #2x image while the 6+ use the #3x image. So i can design the 6+ perfectly, however since both iPhone 5 and 6 use the same image and they have different screen size/ resolution, mu screen design is impacted.
If I design the images as per iPhone 6 size, the images appear too big on iPhone 5 and if I design them as iPhone 5 then they appear to be too small on iPhone 6. This should be simple, what am I missing?
Please help!
Instead of directly using the images you should create an entry for them in the Images.xcassets. Select it in your Project Navigator.
Then drag and drop the #3x or #2x version of your image from the images folder into the list of images in the Images.xcassets window. This will automatically generate a new entry. Then drag the other (#2x or #3x) image into its proper position. It will look like this in the end.
Once that is done you can use it in the UIImageView, or Image for a button or whatever in your Storyboard as just the name without the #2x or #3x.
Now to finally answer your question. You should handle all of the image sizes with constraints in the storyboard. So for instance if you want the same margins on either side of your image you will create constraints between the size of the UIImageView that contains your image and the edge of the Superview. This way the image will be resized for each new screen.
Edited to add Be careful of the Constrain to margins check box as you want to be consistent with using it or not otherwise you will get behavior you didn't plan for. I always uncheck it and have my constraints go to the superview edge, but it doesn't matter as long as you are consistent across your App you won't get confused.

background images are grainy and slow with iOS 8, iphone 5s

My client asked me to put a bunch of random background images on his iPhone app. So it's set up by putting a UIImageView on top of self.view, adding an FXBlurView on top of that (for blurring purposes, obviously), then putting a UIScrollView on top of THAT, and laying translucent UIViews containing control objects on top of all of it. it looks something like the yahoo weather app when all is said and done. my question is twofold. now that i've explained the situation, here are my two questions:
Question 1
the background images are very grainy. what size should they be for an iphone 5? and what size for an iPhone 6? i thought retina was 640x1136, which should be the minimum size right? why is it only showing the entire image for 320x568? from what i've read, they should be the following for a 5s:
320 x 568
640 x 1136
960 x 1704
when i do that, they appear very grainy. if i do any larger than that then the pictures are cut off. the whole picture isn't being shown.
Question 2
In iOS 7, the app ran fantastically. now that iOS 8 is out, the scrolling graphics are slow and choppy. I took the background image out completely and it sped right back up. I'm wondering what i can do to speed the scrolling up again with a background image staying stationery while the control objects scroll.
any ideas for me?
Answer to the first question
apple has you design your apps at 320x568. The extra pixels are used to make the text and images look sharper. Otherwise, everything would be smaller on a retina display and not sharper.
So you don't have direct control over that extra retina space. The iPhone uses it to digitally make the images sharper and clearer.
I'd still like to know why its choppy and the graphics are poor while scrolling
I use FXBlurView as well, and found that turning the dynamic option of the blur view to OFF fixes the issue. For some reason on iOS 8 FXBlurView uses 100% CPU when dynamic is ON.

Why does iPhone app resize for iPad but not iPhone 5

Why do original iPhone applications (normal screen size like iPhone 4/4s) in Xcode resize perfectly for iPad automatically and not for the slightly larger iPhone 5 screen size?
To fit a iPhone 4 view into the iPad each point is scaled equally into two directions. The aspect ratio of a iPhone4-point doesn't change on the iPad screen.
To fit a iPhone 4 view onto the iPhone 5 screen, each point has to be scaled in vertical direction only. This will distort each point and the view, similar to the distortions you get when you watch a movie in the wrong aspect ratio. A circle on the iPhone 4 screen won't be a circle on the iPhone 5. So you can't physically resize the pixels like it's done on the iPad.
In iOS-Development Autoresizing Masks come to the rescue. But there is no way to figure out if your app looks good if the auto resizing scales the view to iPhone 5 size. You have to test each app on a iPhone 5 sized screen. Apple didn't want to do this, so they put an opt-in in place, which you actively had to enable. They choose to use the iPhone5 launch image for that.
If your app looks good when it's vertically scaled simply provide the appropriate launch image.
If you used best practices to develop your iPhone 4 app that's basically all that is needed.
iPhone 5 support needs to be explicitly added by supplying a "Default-568h" start image.

iPhone 5 app compatibility, Is it mandatory to change all the images?

I want to make my App compatible for iPhone 5, i got the point about auto resizing just need to confir, Do i need to add all the images re-sized for iPhone 5 OR can work with re-sizeing only Splash and Background image ?
You will be required to resize the launch images. You need a launch image for the older iPhone screen sizes in normal and retina resolutions as well as an iPhone 5 screen size retina image.
It will be a good idea to rework your app and have background images that can take advantage of the larger iPhone 5 screen size, but will be able to be cropped and still work on the older iPhone screens.
Using either auto layout or setting the resize and pinning struts properly, your other controls and images should be able to be used as they are to adapt your app to look good on the iPhone 5 screen.
You only need to resize the splash screen.

iPhone GUI objects migrating position between normal and retina display

I am developing and app for iPhone which uses graphics for retina and non-retina displays.
Every UIViewController displays both the status bar and the navigation bar.
The views' simulated metrics values are set correctly for the above options.
The issue I am facing is that the buttons are migrating about 30 pixels when the app runs on iPhone 4. The resize settings of all the GUI objects are set to default.
Could you help me with this issue?
Thank you,
Andrei
Are the #2x version of the images exactly twice the resolution of the non-retina versions?
Different sizes can cause the images to change places between displays.
Can you check the value of the frames of buttons both on 3GS and iPhone 4 and see if they are the same?