After Deleting a file?

Discussion in 'iOS Programming' started by salvadormg, Aug 20, 2009.

  1. salvadormg macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #1
    I am just about finished my new app, only thing is i got a great picture for my Default.png then i made an even better one, so i deleted it from my project and tried to put the new Default.png in and it wont let me put in a file the same name as one i just deleted anyone no how to fix this??

    i get this error...

    Could not copy /**/**/Default.png to /Developer/Applications/**/Default.png.
     
  2. TodVader macrumors 6502a

    TodVader

    Joined:
    Sep 27, 2005
    Location:
    Quebec, Canada
    #2
    You probably just deleted the reference to the image. Go to your projects place in finder or use spotlight to delete the file. After that, try again.
     
  3. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #3
    That Fixed the problem thanks a lot!!! :D


    Just one more thing.. I want to include 2 Default images in the start up splash, how do i do this???
    One is the Default.png file for the app and one is my company logo, how to i get the two to appear before the app launches... only the Default.png is working...??
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Sorry, you only get one default image. Either incorporate your company logo into that image or figure out how to present a new view (probably modal) with your real "splash screen" once the app has launched.
     
  5. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #5
    It will only automatically load and display one image for you. You will have to display the other one via your own view.
     
  6. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #6
    Due to the speed of the iPhone 3GS the default.png isn't really the place to put a splash anymore. I've noticed that on mine the default.png's barely show anymore on a lot of apps as they are loading too quickly. You are better off making a view that displays your splashes before loading in your main view
     
  7. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #7
    What would you suggest then? what is apples line on this issue?? i can set the length of my splash screen to anything i want, doesn't this correct it???
    (sleep(2); = Splash screen shows for 2 seconds... at least it works on my device...)

    How would i go about doing another view on start up? is there any simple code to do this?
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    You could add the new view as a subview and then remove it when done. Or you could take advantage of UIViewController's presentModalViewController:animated: instance method.
     
  9. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #9
    Strictly speaking the default.png has never been the place to put splashes, Apple have always insisted it be used to fake a quick app launch, not for splash screens.

    What I would do is have a splash view appear on launch with a timer that swaps the splash and then swaps in the main view after a set period of time. There are various different approaches however

    By calling the sleep() method you are halting the program flow for a period of time which besides many other things is just plain counterproductive on an apps launch
     
  10. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #10
    Do you think it is best to leave out the default then?
     
  11. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #11
    No, you don't want to leave it out. While others have pointed out that you can't rely on it to be displayed for very long given the speed of the 3GS, there are still tons of iPod Touch/pre-3GS iPhone users who will see it for a second or two.
     
  12. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #12
    Yeah maybe I worded what I said a little badly. By all means still use the default.png but also have a view in place afterwards. This way all the devices will show your splash for a decent length of time, older devices will show it for even longer :cool:. What I said about using the splash screen for faking a quick launch is the official apple line like you asked for, I didn't mean don't use it as a splash. Most developers (including myself) have used it for splash screens but now with faster devices coming out, the length of time the default.png is displayed for has drastically reduced.

    My advice would be to have the default.png the same image as the first splash screen on the splash view.
     
  13. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #13
    Thanks,

    I fixed that all up now... I just ended up putting my Logo into the Default Screen... :confused::eek:


    Thanks for the help...
     
  14. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #14
    If you make your first view look the same as your Default.png, you can control how long it appears, by leaving it that view up longer on fast devices (which you can determine by looking at the system hw.machine name), and replacing it away right away on slower devices.

    That's assuming that you think that advertising your brand logo is more important than quicker access to your app on fast devices (which probably depends on the type of app).
     
  15. Troglodyte macrumors member

    Joined:
    Jul 2, 2009
    #15
    Am I the only one that hates splash screens on iPhone apps?

    Don't waste my time with a ego trip - just load the damn app. ;)
     

Share This Page