Added: 1 year ago
From: thenewboston
Views: 17,461
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (56)

Sign In or Sign Up now to post a comment!
  • I laughed my ass off when you said chicken bounce over and over, and then the chicken is looking at you like help me 0.o Hahahaha

  • "chicken bounce....chicken bounce.....check it out... our bacon is still there"

    These are awesome XD

  • this work on xcode 4.0? :O

  • hey does anybody know if you actually need to do this in ios 4? I was pretty sure that the text would stay in there with multitasking, but when i actually terminated my application and restarted it, it had an error (SIGKILL)

  • anyone see a smiley face at 05:48 bottom right conner?

  • its using ios4 multitasking he even said so a few tutorials ago

  • @PanzrKunst thanks for pointing out that you needed that extra '/' in the file path format. I found that it would work fine in the simulator without it, but I needed to add it in order for it to work on my actual phone.

  • I've seen all your iPhone dev tutorials so far and I must say that this one left me in the dust. I guess my poor Obj-C knowledge has finally caught up with me.

    I must also say that this seems like a whole lot of work just to save and recall a single string. Please tell me it's easier than this.

  • Second bug: There is a slash missing then you initialize the file path. It should be '[docsFolder stringByAppendingFormat:@"/myF­ile.plist"]'

    Third bug: reading the file content as you do didn't work in my setup. I used 'NSString *fileContents = [NSString stringWithContentsOfFile:fileP­ath encoding:NSUnicodeStringEncodi­ng error:&errorReading]' instead. But this wasn't enough: if the file is a pList, it's still read incorrectly that way. Don't use any extension, or maybe "txt", but not "plist"

  • @PanzrKunst

    I couldn't enter this code....I'm getting an error saying that errorReading is not declared. I think it's because of the '&' you placed there despite removing that, it didn't work for me.

  • @SilveZX NSError *errorReading;

    NSString *fileContents = [NSString stringWithContentsOfFile:fileP­ath encoding:NSUnicodeStringEncodi­ng error:&errorReading];

    if (fileContents == nil) { NSLog(@"Error reading file '%@\n%@'", filePath, [errorReading localizedFailureReason]);

    }

    else { textField1.text = fileContents;

    }

  • @PanzrKunst

    Alright thanks... I'm going to try it...

  • First, thank you Bucky for all those iPhone dev tutorials, I've been following them all and so I know iPhone dev thanks to you :)

    But there are bugs in this tutorial. First bug: since iPhone multitasking, 'applicationWillTerminate' won't be triggered when you click the home btn. So 'applicationWillResignActive' must be used instead. Similarly, 'viewDidLoad' is only triggered "the first time". You therefore need to read the file content on 'ApplicationDidBecomeActive'.

  • @PanzrKunst If you run this on a device without multi-tasking (I'm using ipod touch 2nd gen) the origional code works fine (with exception to adding the / for the file path) otherwise i'm not sure which method is called if you double tap the menu button and terminate the application that way.

  • Bucky all you did to demonstrate this was making the app enter the background instead of actually closing it out and opening it back up.

  • @linkfan22 this was before iOS 4.0 :P

  • Can we view the file that we saved, when working with the simulator? ie: can we see the contents of the applications document folder without writing an app to do this?

  • @Lamename90210 nope, you must quit iPhone simulator and run it again

  • this is one of the best tutorials in youtube!!!thank you

  • Looking forward to your next tutorial - dont stop here! :) You're the best one around.

  • Bucy's IQ is 10000000000000

    He is soo smart!

  • Bucky, I had one issue that I stumbled across:

    -My app worked exactly as you showed, however, I also opened the old demo of the bank tutorial you did, and typed text into those textFields, to see if leaving would clear the fields and it didn't. So I thought, "hmm, maybe because it's OS 4.0.1" So I double clicked the home button to bring up the running programs, and closed out of both, and then when I opened both of them back up (including the demo we just did) They were both cleared.

  • @bigmike4ya2003 I am having the same results are you are. I think 4.0 saves users states automatically now but Im trying ti figure out how exactly to save info for when the application is completely terminated so I can save highscores

  • wow THANKS bucky

  • GUYS watch this with cc transcribe audio on its HILARIOUS

  • @Cryostasix  Thanks for the suggestion - it's funny!!!

  • FINALLY! I watched the whole objective C series and this iPhone development series.. and finally back on track!!! :D

  • You do not need to save the file as an array. You can write the raw NSString to a file. It's so much easier!!!

  • nice TITS brucky, me mean nice ASS, me mean nice TUTS.

  • you must be pretty drunk if you added a tag called "windows" to an apple programming tutorial

  • PLEASE make a playlist for iPhone App Development please :)

  • Hei Bucky! Great tuts.

    You are working on iOS4 and have backgrounding enabled for youre app. You never terminated youre app so it never saved...

    Also why do you add app to the notification when you dont use it?

  • @Larsjkvegas

    Your'e right. He has to double tap the home button and then press the icon on the multitask-thingy and then press the awesome little red dot to terminate it. So he never actually used any of the code he wrote. We could probably do the same thing by simply adding an empty textfield to the nib. But anyway.. I'm sure it works if he actually terminates it. It's just a little confusing.

    Great tutorials.

  • Bucky make C++ videos or i will fuck you mom!

  • @iPhpMaster You obviously didnt look for them. He has a lot

  • @TheStudentCoder

    yea but not win32/QT GUI programming

  • @iPhpMaster eyy keep calm ;-)

    

  • @iPhpMaster O_O after that upload it to youtube

  • @iPhpMaster No need to be so rude, He already has made a ton of C++ Tutorials... Use the "Search" function. idiots... probably kids, no 1's that rude or stupid...

  • @TheEBookZone I fucked your mom. Now calm down.

  • @TheTIprogrammer Yup, definitely kids... God I hate yobo wanna be's. Why dont you make you own tutorials instead of pissing over others?.. looser...

  • @TheEBookZone We did tit again last night... GOOD TIMES

  • @iPhpMaster Bucky already made ton's of tutorials, he is doing it for free and if you want a tutorial about win32 search youtube, there are other people that teach it to. But leave bucky alone.

  • 10th MOTHER FUCKING ALBINO CUNTS

  • I think that there is a troll? But where? *cough* *cough* Below my post maybe?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more