Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-08-2011, 02:46 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 2
cxr003 is on a distinguished road
Question How to Create a Dynamic Photo Gallery

Hi,

I'm pretty new to the iOS development scene, and for my first project, I am developing an app for a high school band program. I have managed to get the app to automatically update the news and event sections, update a competition page, and I have also figured out how to embed audio and video that will be posted to a website.

My problem is coming up with a way to integrate a constantly updating photo album. I thought that I would use the Three20 library since it supports remote sources, but I can't figure out how to have all photos in a directory automatically shown in the album. I currently have to link each photo manually. This is annoying, and once the app is published, I won't be able to add pictures without re-releasing the app.

I know that what I am trying to do is possible, but even after calling upon my highest google skills, I am not able to find a reasonable solution.

Currently, I have the app setup to use a UIWebView that is directed towards a site styled to look like the iphone photo album, and while this "works," it is far less than ideal, and navigation is obviously a bit odd.

I know the facebook app uses Three20, and those photos are automatically changed, so that is why I thought Three20 would be the way to go, but as I said, I just can't figure it out!

Any help with this would be absolutely awesome! Thanks in advance for your time!
cxr003 is offline   Reply With Quote
Old 01-08-2011, 04:23 PM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

create a php script that return a list of image in xml, similar to

Code:
<image>
    <link>http://www.mysite.com/myimage.png</link>
    <linkPreview>http://www.mysite.com/myimagePreview.png</linkPreview>
    <name>Me and my dog</name>
    <descriprion>etc.....</descriprion>
</image>
Download it with ASIHTTPRequest or NSURLConnection, parse it with NSXMLParser (creating an array of Image, where Image is a your Class with link,linkPreview,name,description, and what you need) and show the images (you can see ScrollViewSuite by apple)
__________________
dany_dev is offline   Reply With Quote
Old 01-09-2011, 12:48 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 2
cxr003 is on a distinguished road
Default I Think I'm Closer...

So that was at least a little helpful. I don't think I'm smart enough to fully absorb the genius of the previous post.

I have created the PHP script, and have a clean xml file that includes link, linkPreview, width, and height, but as for getting it into the iPhone app, I've got nothin'...

I would very much like to use the three20 library or some other method that will give me an identical thumbnail iOS Album interface. The people whom I am designing this for are quite set on this interface. Again, I know it is possible, but I haven't the slightest idea how.

I have been looking at the sample scripts that come with Three20, but haven't been able to put this together.

I have an album, in a separate file, I made using this tutorial: iPhone SDK: Creating a Photo Gallery With Three20

I just can't figure out how to change the individual flickr urls to one parsed xml array, nor am I really sure the best method of parsing the xml file in the first place.

Thanks again for all of the help.
cxr003 is offline   Reply With Quote
Old 01-09-2011, 05:20 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

What you need is just to download your custom xml and parse it. And then you can create objects Photos and add these in the array images of Three20 with a for.

What's the problem, download the xml? if so, take a look to the examples
ASIHTTPRequest example code - All-Seeing Interactive

if the problem is to parse it into an array of your custom objects, take a look here
codesofa Make NSXMLParser your friend..
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

Tags
album, dynamic, gallery, photo, three20

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 368
7 members and 361 guests
blueorb, fredidf, iAppDeveloper, iGamesDev, mottdog, sacha1996, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:32 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0