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

Discussion in 'iPhone/iPad Programming' started by jtbullet, Jan 19, 2009.

  1. macrumors member

    Joined:
    Jan 19, 2009
    #1
    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
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
  3. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #3
    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.
     
  4. macrumors regular

    Joined:
    Dec 1, 2007
    #4
    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 ;)
     
  5. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #5
    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!
     
  6. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    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.
     
  7. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #7
    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!
     
  8. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    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.

    Search around this forum and you'll find plenty of recommendations / answers.
     
  9. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #9
    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!
     
  10. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #10
    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.
     
  11. macrumors 68000

    Joined:
    Nov 3, 2007
    #11
    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]];
    	
    }
     
  12. thread starter macrumors member

    Joined:
    Jan 19, 2009
    #12
    Wow! I can hardly wait to get home to try this out. If this works, I owe you a cold one or 12!
     
  13. macrumors 68000

    Joined:
    Nov 3, 2007
    #13
    Can we wait til late October, don't want to get you arrested for giving alcohol to an underaged person :D
     

Share This Page