help me with this app, cuz its a good one

Discussion in 'iOS Development' started by piratetom95, Aug 15, 2009.

  1. piratetom95

    piratetom95 New Member

    Joined:
    Jun 17, 2008
    Messages:
    644
    Likes Received:
    0
    Device:
    iPod touch
    i am trying to make an app that displays a picture when you open it.
    how would i code this?
    help is MUCH appreciated
  2. NolesFans

    NolesFans New Member

    Joined:
    Sep 23, 2008
    Messages:
    404
    Likes Received:
    0
    Device:
    iPod touch
    I think you need to made Default.png for it.
  3. ipodmail09

    ipodmail09 Member

    Joined:
    Mar 13, 2009
    Messages:
    269
    Likes Received:
    0
    Device:
    2G iPod touch
    ok i think you are thinking of a splash screen / loading screen,

    1)name a image Default.png

    2)in the delegate.m file look for

    [OBJC]- (void)applicationDidFinishLaunching

    Please Register or Log in to view images

    UIApplication *)application {

    sleep(2);

    // Override point for customization after app launch
    [window addSubview:viewController.view];
    [window makeKeyAndVisible];
    }[/OBJC]

    3)Once you found it type sleep(and the number of seconds);


    and hay presto you have a slash image
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Sigh, for the last time:

    DO NOT USE SLEEP()!



    I don't think you guys know what it's actually doing. If you want a thread to sleep, use the methods provided in NSThread.


    EDIT: Especially DO NOT use sleep() during the app launch. SpringBoard will likely kill your app for taking too long to open.
  5. ipodmail09

    ipodmail09 Member

    Joined:
    Mar 13, 2009
    Messages:
    269
    Likes Received:
    0
    Device:
    2G iPod touch
    opps!! sorry for my fro being a noob
  6. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    To the OP:
    Are you looking for the way to make your app display an image when it launches, and then do something else, or is an app that ONLY displays an image your idea of a good app?
  7. piratetom95

    piratetom95 New Member

    Joined:
    Jun 17, 2008
    Messages:
    644
    Likes Received:
    0
    Device:
    iPod touch
    the apps point is to only display a picture. it serves no other purpose.
    i was thinking i could upload the picture to an image hosting site, then make the application open up to that url. that would be pretty easy.
  8. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    It would also waste useless bandwidth.
    Use a UIImageView.

    P.S. What is the purpose?
  9. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    Read the docs for UIImageView and UIImage, so you can better understand the following.

    ---------

    [OBJC]
    NSString *imgPath = @"http://www.mapds.com.au/newsletters/0807/iphone_home.gif";
    NSURL *url = [NSURL URLWithString

    Please Register or Log in to view images

    ath];
    NSData *data = [NSData dataWithContentsOfURL:url];
    UIImage *img = [[UIImage imageWithData:data];

    [/OBJC]

    then,
    [OBJC]
    UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
    [/OBJC]

Share This Page