Yeah, i know i should spend all the free time on this but when it is saturday and sunday, i feel very lazy and just wanna relax, watch tv, watch youtube, play games, going out with friends , do some sport and stuff
Well, i guess at least i will do some quick tutorial for today, since I am not going to do anything big anytime soon so I will just follow a simple tutorial today
http://www.raywenderlich.com/1797/how-to-create-a-simple-iphone-app-tutorial-part-1
will be following this guide, hopefully can at least finish one
when i first create a new empty Master-detail project, i noticed something strange
in my noob eye, i first see the AppDelegate.h and AppDelegate.m, in both of this two we see nothing and no code referencing to the MasterviewController and also the DetailViewController
however, there is a strange thing called the MainStoryBoard.storyboard, if you click that, it show you 3 screen
1. navigation controller scene
2. master view controller - master scene
3. Detail view controller - detail scene
there is also 4 strange file under the "supporting files"
1. scarybug-info.plist
2. infoplist.strings
3.main.m
4. scarybug-prefix.pch
i am just guessing the main.m is the master of all main
as with java there always is a super main stuff such as
public static void main( String arg{})
this one start with
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Weird stuff
following the tutorial asking me to create a new file under the class of NSObject, in my noob eye, what the hell is NSObject? weird stuff
anyway, back to the tutorial, it ask me to modify the master view via the storyboard
it look like this
as you can see, everything can be clicked
then in the masterviewcontroller.m we must do some major changes on the method
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:@"MyBasicCell"];
ScaryBugDoc *bug = [self.bugs objectAtIndex:indexPath.row];
cell.textLabel.text = bug.data.title;
cell.imageView.image = bug.thumbImage;
return cell;
}
Wow, how a noob supposed to know all of this? it is so freaky
this kinda code can produce something like this
Man, this is awesome and scary at the same time
because i cannot understand anything
anyway, will get back to figure out this soon