If you want to really learn how to code, then learning on your iPhone is probably not as good as actually taking the time to learn the basics of Objective-C.
There is a university app whee you can download video courses and that would teach you how to make iPhone apps using Xcode. Obj-c is one of the courses in there.