How to display a loading gif image in iphone application while uiwebview content loads - iphone

I have a uiwebview in my iphone application. I want to show a loading gif image which is located in my application , until complete contents of my uiwebview loads . Can anybody suggest a method ?

Here's a detailed post, including sample code, regarding usage of UIActivityIndicatorView to overlay a loading view over different types of subviews.

Related

iPhone - Create an images grid list

I'm developing an application that get images from a website and display to user with a grid view like Photo app by Apple.
When you tap on an image I would to push a view controller that displays images info and other stuff.
What's the better way to implement this? I thought a custom UITableViewCell. (I've seen there are Three20 and AQGridView libs but I'm a newbie developer and the docs are very very poor. Hints?)
Thanks.
I think the UITableView is the best way of doing it. Its memory efficient and your only going to display 3 images anyway so the overhead isn't that bad. A tip, when your asynchronously getting images from the website, create a custom view is a delegate of NSURLRequest, get the data from a webpage, parse the data into a UIImage using imageWithData and when the finished delegate method is called, put a imageview on top of the custom view. This is the best method of downloading asynchronous methods. Good luck!
I made a thumbnail grid list like tableView but multicolumn, it's open source, on
http://www.cocoacontrols.com/platforms/ios/controls/thumbnail-list-view
https://github.com/mohammedDehairy/ThumbnailList

How to load images in uitableview?

In my application i m using webservices to get the the image to load in UITableView. the images loaded in the cell and i scroll down to see other datas, if i again scroll up to see already loaded data, there the loaded images are again loading.
Why this happens. can anyone tell that how to display images in LazyTableImage example
If we scroll, each time cellForRowAtInpdex is called every time.so,you should handle the image loading in someother part(say ViewDidLoad)..

Dynamically loading hi-res images into UIScrollView

I've been looking into creating a gallery mode in my application.
The functionality will be identical to the built in Photos App.
Here's the flow:
1. You touch on a thumbnail and ...
2. a modal view displays a large detail version of the image
3. You have the ability to scroll horizontally through all the images in the gallery while in this modal view
I'm stuck on step 3.
How do I dynamically load hi res images into a scroll view? I understand I need to set the contentSize for the the scrollView but how do I do that when I've only selected and loaded one image? What delegate methods do I need to implement and what does the heavy lifting look like?
Thanks in advance!
Refer to the following example project from apple, it shows how to use a scroll view to scroll horizontally through some views, u shouod only need to change the conents of those views to contain ur images http://developer.apple.com/iphone/library/iPad/index.html#samplecode/PageControl/Introduction/Intro.html

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.

Displaying images in UIScrollView programmatically

I am displaying 200 thumb nail images of size 4kb to 12kb in UIScrollView programmatically by adding UIButton when i am debugging in device it takes time to load the view.. can there is some method to load quickly the thumb mages are store in disk.
Use lazy loading by only loading the ones you show at once in any given moment - or use a background thread to perform the loading while keeping the interface responsive.
If your layout allows, use a table view and a custom cell that holds several thumbnails. That way you can use the tableview controller's built in methods to manage the lazy loading. I'm pretty sure that is how Apple does the thumbnails in the photo library.