Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
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
 

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
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

macrumors 6502
Dec 1, 2007
250
3
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

macrumors member
Original poster
Jan 19, 2009
30
0
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

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
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

macrumors member
Original poster
Jan 19, 2009
30
0
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

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
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

macrumors member
Original poster
Jan 19, 2009
30
0
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

macrumors member
Original poster
Jan 19, 2009
30
0
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

macrumors 68020
Nov 3, 2007
2,215
1,029
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.
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
Code:
- (void)viewDidLoad {
	NSLog(@"Changed the page");
	[imageView setImage:[MyViewController pageControlImageWithIndex:pageNumber]];
	
}
 

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
Wow! I can hardly wait to get home to try this out. If this works, I owe you a cold one or 12!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.