iPhone SDK loading screen - iphone

I have a view in my app where I use a very large photo that is Hi-Res and takes a bit of time to load. How do I put a loading screen while this is happening? The kind of loading screen with the spinning loading wheel so that the app does not look like it has frozen? Thanks in advance for any help!
Edit: Note that I am simply loading the image from the main bundle and not a URL

Check out these Open-Source activity indicators.
TDHUDProgressBar
Looks like Tweetie's/Twitter's Progress bar.
MBProgressHUD
A view that appears and contains a Activity Indicator, much like the Private Class UIProgressHUD.

Put an activity indicator (the spinning wheel) into your view and hide it when your hi-res image has finished loading.

Related

iOS custom splash screen

I need to load a bunch of things in the beginning of my application, so I would like to implement a splash screen. I know about the Default.png screen, and I dont think that works.
Does iOS have something built-in for this? If not what is the easiest way to do so?
Does your app take too long to load and you want to do your own splash screen manually to avoid being quit by the OS on launch?
Once your app gets control, you throw up whatever you want on screen. And if that first things happens to be a full screen image view showing your splash screen while lots of things load up, well you can call that a splash screen if you like.
When loading is done, hide or destroy that image view and you are good to go.
I'm not going to provide specific code because, frankly, if you dont know how to show an image view fullscreen, you have some UIKit homework to first.
In application did load have a splash screen viewcontroller display till your app is fully loaded then dismiss the controller. The built in splash screen functionality is Default.png, and a snapshot of the application.

What can I do to make an image appear before my app launch?

I´m doing an app for iPhone in objective-c, and before my app launches I want a splash screen to appear.
Thanks!
I think you are looking for Application Launch Images.
You just need to rename any image you want to "Default.png" and just add it in your project. That's all. Application will display that image while your app is loading.
As veredesmaralad answered, you can use an application launch image, but it's not really intended for use as a splash screen. It's intended to give the user immediate feedback that the app is launching, yet give the app some time to initialize. This image is displayed by the OS until your app puts its window on screen. The display time will vary from device to device.
If I were trying to do something more involved such as displaying the splash screen for a longer time, or animating the splash screen, I would display a view for the splash screen, then move on to the main app. I might just have my main UIViewController show the view, and then have an NSTimer tell the controller when to replace the view with the next view (e.g. the main user interface). For a more involved animated splash screen I might use a dedicated UIViewController to run that animation. Then when the animation completes I'd have the splash screen's controller load the next controller.
First off, this is called a "splash screen" and you may want to read up about it from somewhere like Wikipedia.
The answer to this question will depend heavily on what programming language you're using. If you could provide better explanation, a better answer can be given.

Display UIActivityIndicatorView while loading the application

I checked other questions and found none with my doubt.
Is there a way to display an UIActivityIndicatorView "on top" of Default.png while my iPhone application is being loaded?
Thanks in advance.
Camilo # lx-apps.com/
You can paste a (static) indicator view image on top of Default.png. Of course it won't animate.
Other than that you can't do anything because the app isn't loaded yet, so none of your UI code will run.

UIScrollView: Activity Indicator while loading image from url

I need an Activity indicator spinning in a modal view that has an UIScrollView while
the content of the ScrollView (an image from url) is loading.
Any ideas of how to get this done?
As a plus I need to know how to tell the ScrollView to behave like the Photos Iphone Native App, I mean, load an image, adjust it to fit the screen without loosing aspect ratio.
Thanx!!!!
You need to use two steps:
First, download the image and display the activity indicator
When done, display the image and remove the activity indicator
The tricky part is it probably won't work if you just use NSData's initWithContentsOfURL: because it is a blocking call. On the Mac you can use NSURLDownload to download content asynchronously, you should check if this is available on the iPhone SDK.
For using a UIScrollView to display an image and fitting it to the screen at first, you should check the ScrollViewSuite sample code. It does exactly what you are looking for.

Why my iPhone app has a delayed loading?

I noticed some iPhone apps give you the title screen instantly.
Then there are some apps that gives you a black/blank screen for a brief moment.
I have the latter issue, but its lasting about 2 seconds.
I would like to display a PNG image (over 200 KB size) and a loading indicator view.
My app is based on UIView. The specified a custom UIView that basically loads and renders the said image as the wallpaper.
I tried not loading this image, yet im still getting a 2 second delay time to load.
The app delegate basically sets the view controller's view as a subview.
This delay is only seen on the device, not on the simulator.
What am i over-seeing?
If you place a Default.png file in your mainbundle, it gets displayed at launch time between the time that the app is tapped on till the time that you replace it with another view.
The reason you don't see it in the simulator is because it is faster at loading your app.
If you want to display a progress indicator, you will only be able to do it once the appDidFinishLaunching is called, but the delay that you are seeing is still there.
One trick I use is to have the same Default.png displayed again in appDidFinishLaunching and then draw a progress bar on top of that. Sure there is still the static display during the initial delay, but from there until all my initial views are loaded, I display a progress bar.
There have been some recent discussions about this on StackOverflow that you should see. And see this: How To Make Your iPhone App Launch Faster