PDA

View Full Version : Looking for idea on simple app, just a wrapper for 480x320 images, nothing more.




jtbullet
Jan 19, 2009, 09:03 AM
Hi guys. I am not a programmer, but I am picking up just enough to write the code so that I can build a wrapper for my 90 page graphic novel. It is 90 480x320 jpegs and basically, I need to be able to swipe to go back and forth. Ideally I will be able to add a button at the end that lets me call my homepage in safari. I heard that there may be gallery code included somewhere in the sdk that I could pillage for this purpose. Does anyone know where to point me?
Thanks,
Jarrett Towe



dejo
Jan 19, 2009, 11:55 AM
Check out the Scrolling (http://developer.apple.com/iphone/library/samplecode/Scrolling/index.html) sample app.

jtbullet
Jan 19, 2009, 12:23 PM
Thanks so much for the help! Hopefully this will propel me into learning c, and objective c. I sit by a guy who is a lotus notes developer, and he tells me I can pick it up. Your input is most appreciated.

CommanderData
Jan 19, 2009, 12:25 PM
Hi guys. I am not a programmer, but I am picking up just enough to write the code so that I can build a wrapper for my 90 page graphic novel. It is 90 480x320 jpegs and basically, I need to be able to swipe to go back and forth. Ideally I will be able to add a button at the end that lets me call my homepage in safari. I heard that there may be gallery code included somewhere in the sdk that I could pillage for this purpose. Does anyone know where to point me?
Thanks,
Jarrett Towe

Don't forget a way to save the current page so you can come back where you left off when interrupted. Also have a way to start over at the beginning, without having to swipe backwards through 90 pages...

Come to think of it, maybe you should have a start screen with three buttons: one that lets the user start reading at the beginning, one from the last read page, and one to take them to your website. Perhaps a fourth to take them into the app store for more graphic novels from you too ;)

jtbullet
Jan 19, 2009, 12:39 PM
Yes, I figured I could build on the foundation in scrolling, and I see drill down would be good as well, since I also have a survival guide I am going to be putting on as well. These are great hints commander! This is a very nice forum to have found myself in!

dejo
Jan 19, 2009, 12:45 PM
jtbullet, if you are going to be getting into this more seriously, it would behoove you to learn some programming, etc. though. And you'll find plenty of advice and links to get you started in this very forum.

jtbullet
Jan 19, 2009, 01:11 PM
Noted. I am kind of getting into this from the opposite direction from most. Most people learn programming, then find applications for it. I have an application, but no programming skills. The good thing is that from what I have surveyed so far, the majority of the things I need are prebuilt for the phone. I just want to relay information, and the iphone seems to have a very good tool kit.

Anybody want to recommend a roadmap? i.e. learn c, then objective c, then iphone specific objective c? Can I use xcode to do my learning programming in c? I traded a bunch of junk for a core solo mac mini just so I could get the sdk without a huge money investment.

thanks again! I knew I was stepping into a potential pit of vipers by asking such newbie questions, but the response has been overwhelmingly polite!

dejo
Jan 19, 2009, 01:21 PM
Noted. I am kind of getting into this from the opposite direction from most. Most people learn programming, then find applications for it. I have an application, but no programming skills.
I've been programming for almost 30 years now and I've always found that one of the best ways to learn programming is with an application in mind. Sample apps , tutorials, etc. are not to be ignored but, for me, the true learning comes when writing for a goal that I, myself, have come up with.

Anybody want to recommend a roadmap? i.e. learn c, then objective c, then iphone specific objective c? Can I use xcode to do my learning programming in c?
Search around this forum and you'll find plenty of recommendations / answers.

jtbullet
Jan 20, 2009, 12:58 PM
Great news! Scrolling is perfect. Of course, I will have to modify it for my uses, but it looks perfect!

To those suggesting I learn programming, I bought 3 books:
1) Learn C on the Mac - Apress
2) an Objective-C book - Apress
3) An Iphone SDK book - Apress

these are the ones with the fruit on the cover. I hope to learn something at the ripe old age of 36!

jtbullet
Jan 22, 2009, 08:29 AM
Ok. Now I have surmised that I need to be implementing uiscrollview to perform my scrolling image function. I found a great example on apples site:
pageview

it lets you scroll back and forth between pages that are simply text labels/ Now I need to figure out how to make it load images instead of text labels, and make the data persistent so returning to the app leaves you on the same page as when you left, and I will be done, except for that pesky unloading of images that needs to be done.

Jeremy1026
Jan 22, 2009, 08:54 AM
Ok. Now I have surmised that I need to be implementing uiscrollview to perform my scrolling image function. I found a great example on apples site:
pageview

it lets you scroll back and forth between pages that are simply text labels/ Now I need to figure out how to make it load images instead of text labels, and make the data persistent so returning to the app leaves you on the same page as when you left, and I will be done, except for that pesky unloading of images that needs to be done.

Add an image view to the xib file and delete the label. Connect the image view to an IBOutlet, I called mine imageView. Then replace the +(NSString)blah blah blah function with the following code.
+ (UIImage *)pageControlImageWithIndex:(NSUInteger)index {
if (__pageControlImageList == nil) {
__pageControlImageList = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"image1.png"],[UIImage imageNamed:@"image2.png"],
[UIImage imageNamed:@"image3.png"],[UIImage imageNamed:@"image4.png"],[UIImage imageNamed:@"image5.png"], nil];
}
// Mod the index by the list length to ensure access remains in bounds.
return [__pageControlImageList objectAtIndex:index % [__pageControlImageList count]];
}

Then change the view did load to
- (void)viewDidLoad {
NSLog(@"Changed the page");
[imageView setImage:[MyViewController pageControlImageWithIndex:pageNumber]];

}

jtbullet
Jan 22, 2009, 10:01 AM
Wow! I can hardly wait to get home to try this out. If this works, I owe you a cold one or 12!

Jeremy1026
Jan 22, 2009, 10:36 PM
Wow! I can hardly wait to get home to try this out. If this works, I owe you a cold one or 12!

Can we wait til late October, don't want to get you arrested for giving alcohol to an underaged person :D