Object-C Initial Experience
A few weeks ago, I read a book and marked an example of Coding. (Books are written on blogs, sent by CSDN, and can also be bought in C currency)
Let's look at some examples over the weekend.
In the spring of 2015, when I bought a Mac, I started a HelloWorld of Object-C. After all, I am a newbie.
In general, Mac, XCode, and Object-C are especially difficult to use.
The operating system, shortcut keys, and IDE usage are so uncomfortable. After all, after using Windows for more than 10 years, it is very difficult to switch to Mac at once.
I bought a Mac with a relatively small keyboard, which is not very convenient. I am not used to using Hp computers.
Today, I personally Coding a few small examples, milestones, indicating that I have really started.
/// Main. m // switch /// Created by fansunion on 15/11/15. // Copyright (c) 2015 demo. All rights reserved. // # import
Int main (int argc, const char * argv []) {@ autoreleasepool {// insert code here... NSLog (@ Hi, FansUnion !); } Return 0 ;}
11:36:44. 984 switch [1410: 50516] Hi, FansUnion!
Program ended with exit code: 0
/// Main. m // for /// Created by fansunion on 15/11/15. // Copyright (c) 2015 demo. All rights reserved. // # import
Int main (int argc, const char * argv []) {@ autoreleasepool {// insert code here... int n = 0; int sum = 0; for (n = 1; n <= 10; n = n + 1) {sum + = n ;} NSLog (@ The sum is % I, sum);} return 0 ;}
11:08:42. 517 for [1242: 40319] The sum is 55
Program ended with exit code: 0
Mac is very artistic, But switching between multiple software is really difficult to use.
Windows is the mainstream.