The second phase of my internship is dealing with iOS programming. Before, I did have any experience with iOS, even the code structure. I just know it uses Objective-C, that’s all.
At first, I just want to learn more about Android programming during this internship, but then I thought why did not learn something new. I already knew about Android. If I want to know more, do it myself. Why did not take this opportunity to know about iOS world
My only training with iOS is short, really short. Below is the summary:
- Function start with “-” then “return type”, “name”, “:”, “variables” (not we can use name alias for variable). For example:
- (void) registerUser : (NSString)username withPassword:(NSString)password
- Call function within sqaure brackets “[]“. For example:
[registerUser:username withPassword:password]
- If there’s a bug in iOS program, usually it’s “BAD ACCESS”. It usually caused by “init” and “release” variable wrong way. For example, if variable is initiated, then released somewhere, you forgot, then use it again –> BAD ACCESS. Or even if it’s release yet, but you don’t set property “retain” for it before use it in another thread –> BAD ACCESS. Besides, if varaible is initiated, but haven’t released –> MEMORY LEAK.
- Design UI in iOS inherited from class “UIView”. “IBOutlet” is UI control in iOS, “IBAction” is UI controller of UI control. Binding IBOutlet, IBAction from GUI to UIView –> manually manage UI controls functionality.
English
French