Ipad screen blinking/flickering randomly while running my application - iphone

Most of the times when I run my application , the marked area starts blinking continuously. Sometime , the left and right margin of the iPad also starts blinking. It happens randomly.
I would like to know whether its a hardware issue , which is happening on my iPad only(iPad 3)
or it has something to do with my application memory allocation .
I have done quite a search on the web regarding this but cant find anything.
About my application :
It captures data from the user on the table form , then we capture some images using av foundation and upload the data and images on the server . The uploading is done asynchronously .I also perform some image operations on the images captured.
Note- This blinking/Flickering only happens when I run my application and that too randomly. iOS version is 6.1.

I faced the same problem with one of my application ,in which I was using the high defination images . If you are running your app on to non-retina device , the images getting consumed at that time should be low resolution ,i.e. Suppose you are setting a background image for any view then you must be having you must be having to images for background . let one be having resolution (320*480) for non-retina , and another (640*960) for retina . also you must follow the naming convention so that the device automatically the right image according to the device's resolution .
backgroundImage~iphone.png (for non-retina iphone)
backgroundImage~iphone#2x.png (for retina iphone)
backgroundImage.png (for non-retina ipad)
backgroundImage#2x.png (for retina ipad)
Also check the memory allocation using the Instrument in XCode and release the un-necessary wherever possible
Hope it will help you !

Related

How To set Launch Images for Universal app

I'm using Xcode 10.1 and my app is a universal app. I'm having a design issue when loading the launch images using the assets i.e. it showing some black screen background in iPad Pro 11 inch and iPad pro 12.9 (3rd generation) devices other than that it working fine in all devices. So how can solve that issue? And If I want to use the LaunchScreen.storyboard file how can I set a single image to satisfy all screen sizes(which image size and what resolution(2x or 3x) have to use) ? or how to use the Static Launch Screen Images by the apple click here?
Any help appreciated.
As you wrote there are two ways to configure the LaunchScreen:
Static image from the special imagest - LaunchImage.launchimage
Designed screen that can hold multiple UI elements - LaunchScreen.storyboard
If your launch screen is simple enough and you choose to use Static image please make sure that your Info.plist doesn't hold the following key: <key>UILaunchStoryboardName</key> <string>LaunchScreen</string>, if it does then the static image won't be used.
The LaunchImage.launchimage holds an image for all device types and tells you which image size to use.
If you use it and do populate all the images and still some devices has no launch image try cleaning and rebuilding your app and uninstalling and reinstalling the app from your test device or simulator. Also consider updating your environment (xCode).
If you choose to use Designed screen please avoid setting the source of your ImageView to the LaunchImage.launchimage, its a special imageset. You can only use regular x.imagesets with less images (1x 2x R4 3x).
Take a look at the following answer to a different question, it explains the mechanism that auto selects the image, it also has table that connects iPhone type to the selected image.

Cocos2d iphone app runs oddly on actual iphone

I have a simple application using Cocos2d, and all the images show up fine when running on the simulator. However, when i run it on an iphone, all the images are scaled up and incredible amount, making the game unplayable.
Has anyone got any ideas as to why this is happening, and how to fix it?
You need to consider the possibility that your simulator is running retina. Probably you are trying to display an image that is at the higher resolution on an older, non-retina device.
You can also just add the suffix "-hd" to any image, and then cocos2d will recognize it as being at the higher resolution automatically. But when you actually finish your app you will want to have 2 copies of each image, one at each resolution.
I found out that the problem was that when i initialised the sprite, using spriteWithFile, it set it to a certain size. When i changed the sprites texture later on, it kept the size of the last image, but had a different texture.

tabBar app launches very slowly on iPhone device

I have a tab bar based app that runs like a charm on simulator and tested on instruments, the app contains 6 tabs, the first one that is been loaded contains only 8 round rect buttons (with a little png image on each one, image size is very small), each button when touched (up inside) will display a diferent view controller. each one of the other tabs contains a table view except for a one that contains a webView that loads a 25 MB PDF file. However, when I try to test the app on iphone device (iphone 1st genration the one that is before 3G, that runs ios 3.0.1) that app takes around a minute to load, how come that ??? what is the reason for this weird problem ?
I guess that's because you're loading a 25MB PDF file. This is huge for a 1st generation iPhone.
Its probably because the simulator uses your computer's resources, for it a 25mb pdf file might be nothing whereas it porbably is a huge strain for the iphone with its limited resource count. As has been stated above,try it with a smaller pdf , it should be much much faster on the iphone.
Try changing the PDF to something that is tiny, 100KB maybe and see if it is still doing that. If not then it is due to the fact that the app is trying to load the PDF when it runs. Remember that the device may also be scanning the app to see what is in the bundle and that could also slow it down. Never the less, a 25MB PDF is far too large to have on any device, even a computer. Trying loading it on a computer zooming right in and scrolling about, it will undoubtably lag.
If you want to reduce the size of the PDF, use the Quartz Filter that comes in Preview as this should really reduce the file size.

App running on iPhone 4 has a 320x480 resolution instead of 640x960

I'm creating an iPhone app, which will run on iPhone 3 and iPhone 4.
To that point, I was trying to make the images adjust to the resolution, but it turns out that even when running on the iPhone 4, the size of my window is 320x480.
On the XIB I specified "fullscreen at launch" and for the ViewController I even specified "Wants fullscreen", but I can never get it to recognise the actual resolution.
Am I missing something?
Is it running full screen on your iPhone 4? (I don't mean what resolution is being reported, I mean are there black bars around the app - I bet there aren't).
iOS is 'magical' in that you just deal with iPhone 3 size things i.e. xibs etc and it scales it correctly for you on the iPhone 4. You will always see the smaller resolution when you query the display.
To get images to load the correct resolution just create two versions i.e.
myImage.png
myImage#2x.png
Make the second one exactly twice the size of the first and the iPhone will do the rest.
PS There's a property that's been added to UIImageView called scale - it's how the iPhone knows how large to render an image - have a look at the docs here.

How will I have to update how I program for iPhones now with iOS4?

For example, preparing a launch screen of 320 x 480 would have to be changed....
How is that going to work for us? Are programmers always going to have to be submitting a high-res that will be scaled down for old devices such as the iphone 3g?
The size of the screen is basically 4 times on a pixel by pixel basis. So each pixel of your image for example gets boosted to 4.
What this means for you? You don't have to change your App, your app will scale to the hi res screen for you, same with your UI and images within your UI. Of course if you want to take advantage of the better screen quality you will have to submit hi res images.
I haven't looked at going the other way but I believe it would be a similar case.
One exception to this is text. It automatically scales to the higher res for you for free. So text will look super sharp. One problem with this is if your loading image has text based on the original load screen that wouldn't look the same as when the high res text loads.
Strictly speaking, anyone who's seen the documentation on how they're handling this is still under non-disclosure until Monday, when the new iOS ships.
Suffice to say, it's clever. You'll be able to put both high and low-rez versions of ALL your images into your app, and then load them into your app in a way that's totally transparent from the code side. The device will make its own call about which version of the image is appropriate for the kind of screen it's got.
Now that the WWDC 2010 videos are available for free to any registered iPhone developer (or ADC member), I recommend watching Session 134: Optimize your iPhone App for the Retina Display for a full description of what you need to do to support the iPhone 4's new display.