Help With Robust SlideShow APP

Discussion in 'iOS Development' started by NSeven, Jan 8, 2010.

  1. NSeven

    NSeven New Member

    Joined:
    Jan 8, 2010
    Messages:
    9
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Heya guys im new to all this.

    I was wondering if anyone could help me with a robust slideshow app.

    I have one but when i put more than 50 jpgs in ( About 90k each ) it starts to crash and lag.

    On ITunes there are apps with 200 images.

    Could anyone help me create a robust APP?

    Take Care
  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    90kb? Are you releasing the images?
  3. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    1. ^This (sorry, I couldn't resist!)

    2. Why do you need an app? Do you need something more "kiosk-esque" than Photos.app?

    3. Apple does not recommend UIImages larger than 1024x1024. This is unlikely in your case, since your images are all about 90k, but I thought I's throw in the possibility.

    4. On what function does your app crash/lag? You should do some investigation with GDB and Instruments.

    5. Are you just adding new UIImageViews every time and forgetting about the old ones?

    (6. Just a semi-relevant tip: You shouldn't hardcode the image filenames; for example, you can put them into one plist file, which is parsed by your app)
  4. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    Due to obvious memory constraints on the iPhone, you can't simply allocate inordinate amounts of memory at once. (You should avoid that on any platform). You need to come up with a solution that only allocates memory for, say, 5-10 images, and dynamically frees/creates objects as needed. That is how UITableView handles cells—it recycles cells, so cells are only in memory if they need to be.
  5. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Except for a the new iMac, on there you can do as you please.
  6. NSeven

    NSeven New Member

    Joined:
    Jan 8, 2010
    Messages:
    9
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Thanks for the tips guys but i really don't know how to implement that sort of design.

    I have asked on rent a coder to see if anyone can help.

    I dont mind paying for help.

    Or if someone could build a template so that all i have to do is add images i will pay them.

    Take Care
  7. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    As soon as you load an image and add it to a view, release it. That said, recycle your image views, reusing them as often as you can. You shouldn't have more than two or three image views. If you do, then the application is coded very poorly.

Share This Page