As i say i'm new to this stuff and figure from having done some coding before that this should be possible without being overly complex. I'm just not sure how to do it in Xcode.
Hey guys, Thanks a million for the quick replies. I was clearly bleary eyed at 4am last night.
Thanks for pointing out those 2 mistakes. One of those things the longer you look at it the less you notice!
One warning appears when i run it now, saying that the stringWithContentsOfFile is deprecated
This however then doesn't actually fill the array with the data.
Can i just run the program with the warning without a problem or is there a bigger picture?
On a side not can you submit your app to apple with this or any warnings?
Whenever you are informed of a deprecated method, search the documentation for that method and see what it tells you. In this particular case, I didn't find the deprecated notice for this one, but did find these methods:
For the first one, the documentation states: If the file can’t be opened or there is an encoding error, returns nil.
There is nothing about a warning that will automatically stop you from submitting to the store. HOWEVER, there are a variety of reasons that you should address all warnings and errors before submitting your app, including:
1) Warning indicates that you are using a private method, which these days is a cause for rejection
2) Warning indicates an incorrect method name, which will crash if that portion of code is run
3) Deprecated warning should work right now, but may stop working at some point in the future. We don't yet know how aggressive Apple will be with removing stuff from the iPhone OS.
There are a variety of harmless warnings, too, but in general, fix them all.
I have tried to fix it as recomended by the following line from other users.
Code:
[NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:nil];
This however then doesn't actually fill the array with the data.
It should work... unless, of course, your text file isn't UTF8. Maybe it's UTF16?
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.
Thanks again guys for the feedback.
Back from holidays and had a look into your suggestions. The file was UTF-16. Changing this and placing the other code in has worked.
Really appreciate Brainster about the details on loading apps to the App Store. NO warnings is good news now though
^^^ I don't believe that's required, but certainly couldn't hurt.
Although the larger point raised is verifying that the method is actually being called.
Edit: Ah yes, whatever is in .h needs to match .m. That matters.
i have made the view based application,
in the 1st view i have browse button to browse the image,and i even view that image to the same browse view,
when the user selects the other button it will take me to the next view where i want to show the same image of the browsed one,and have to add the texture effects to this image
may i know the steps or any sample code to this issues im facing...