I am building an iPhone app that I would like to be able to have a gallery of images that is loaded from an XML file. The xml simply has the name of the image, and the link for each image as the exact URL where the image is loaded. I have looked at a few different examples like, https://github.com/AlanQuatermain/AQGridView but have a lot of problems customizing it for my use. The link I gave seems way too in depth for the simple thing I want of parsing an XML (which my code does) and to create a 'thumnbail' for each article, filling in that thumbnail with the image provided in the 'link' category of the XML. Could someone help me out a little bit? I am using ASIHTTPREQUEST and GDATAXML libraries to parse my XML as shown in Ray Wenderlich's tutorial on parsing.
EDIT: Looking over stuff, I guess I can create a Custom Cell and only have a UIImageView in the custom cell, but how would I write up the code so I can have about 4 columns of pictures across the cell, and have it load a different picture with each?
If you want a simple solution check out https://github.com/kirbyt/KTPhotoBrowser
It works by using a datasource which you define. these can be images or just URLS. it then goes and fetches the URL and displays the image. It also makes it easier to select a single image compared to your way of using a simple UITableView.
Have a look at the samples included it should fit your purpose.
Related
I am wondering if anyone can offer any advice towards solving this problem.
I am building an app that uses a UIScrollView with paging enabled, with each page corresponding to downloaded and parsed XML data. Part of that XML data is a URL to an image.
Now, it would take forever to load an app that downloads the image for every XML entry and then push it to the respective UIScrollView page created on runtime with the rest of the XML data.
Is there a way to be able to detect which UIScrollView page you are on and then download the image as needed and still allow the rest of the data to download at runtime?
Try to read SDWebImage or Apple's LazyTableImages
Just as referenece, I solved it by adding all of the image views into an NSArray. Using the scroll view delegate, I was able to determine which page number I was on, and translated that page number to an integer that I used to access the appropriate uiimage view located within the array.
It seems to work great!
Might you offer a better solution?
I've seen a lot of apps that when you click photos you get a small square of each image, and then when you click them you get a full screen version. Actually, just like the photoreel.
Is there a way of populating the photoreel with an array of images? I have about 6 per location that I'd like to show like that.
I've had a google, but coming up a bit blank!
Any help would be appreciated
This is a Flikr JSON tutorial (the first part is mostly the JSON calls but they do some early GUI set up too) but it gets a preview of each image in a small thumbnail and then when clicked it opens the full image in the same window.
Depending on how your images are loaded simply replace the json creation with your array/dictionary params and follow how the tutorial progresses, its only 3 parts and has a good starting point for what you're looking for.
Hope it helps
Hi i am beginner in iphone programming i am doing a photo gallery app. In which i need to apply swapping of array of images on UIImageView along with zooming action.
can any one help me to do this by providing any sample codes or links..
download try this code, i'm using it and it's well done:
mwaterfall-MWPhotoBrowser
there's also the more complete Three20 Photo (search in github.com or in stackoverflow.com for old question), it has more kind of objects... but is also more complicated to be used...
I want to build an iPhone app that should , among other things, display the some content of a website's detail pages. This content includes a)a title b) an image c) a text passage (with multiple paragraphs.
I have done a brief research and found out that the easiest way to do this is by using uiwebview. The problem is that in that scenario I would have to be constantly in touch with the person responsible for the website in order to create a modified html/css version for the iPhone client.
As a result I was wondering if there is a feasible alternative. I can get the data I want in json format with HTML Requests. Maybe if I used a UIScrollView that contains a UILabel for the title, a UIImage for the image and another UILabel for the text passage? But the problem is how to set the UIscrollview content size since it dependent on the size of the text passage?
I am a iPhone dev noob and I am possibly missing something obvious here so I would be very greatful if someone could point me in the right direction.
Sounds like you are building an app ontop of somebody elses content. Provided this is legal, this other site should have a published api where you can start to write your app. Get the json or xml, then populate them in a UIViewController using a UIImageView to display the image, UITextView for the text. The UITextView already has a built in scroller so you dont need a UIScrollView
i want to display many images and button on each image in a scroll view. and i want the images loaded which are only visible if the user scrolls i want do load the images dynamically. so can i use the Three20 code how to see the actual code for making tiles
in Three20
Yes, Three20 can do that. If I remember correctly, you need to subclass TTPhotoSource and implement code to load the image on-demand from the server.
Interesting classes regarding internet-aware TableViews are TTTableViewDataSource and TTTableViewController Sorry, can't post links for these. New users like me are limited to one link per post.
You find them on Github too. Just look at the "/src/Three20UI/Headers/"-directory