Program Log--ios "Hello World" program

Source: Internet
Author: User

My study log 001: The first program "Hello World"

Give me the tools to do the program: Mac OS X virtual machine 10.9.3 Xcode6 Baidu-^-^ Reference IPhone30 days Proficient (this book is outdated, but there is a certain reference value, can guide the correct direction of learning).

I do the purpose of the diary is not to sort out the things, learn and as a summary, very suitable for beginners as extracurricular reading to see what I did not before you have mastered, as a man-made mirror to know the purpose of the gains and losses.

Specifically how to do Baidu "iOS Hello World" There are a lot of tutorials, graphics and text combination, counted on the hand to teach you to do this program.

This small program is very simple, just as an iOS beginner as the first footprint to do mobile apps.


Question: For new Singleview, the system default code inside the VIEWCONTROLLER.M file

Called when the init--initializes the program

viewdidload--Load View

Called when the view of the viewwillappear--object is about to join the window

Called when the view of the viewdidappear--object has been added to the window

Called when the view of the viewwilldisappear--object is about to disappear or is overwritten or hidden

Called when the view of the viewdiddisappear--object has disappeared from being overwritten or hidden

Call this method when didreceivememorywarning memory is low

A total of 7 default methods are summarized, preceded by methods, and the following descriptions refer to when these methods are called.

As a beginner, I'm not going to narrow down these default methods here, just know that if you do an application, you can make a fuss over these scenarios, such as when the program initializes, what the developer should do, what to do after loading the view, and so on. In the future to do the procedure to ensure that there will be contact, now need to do is to do an understanding of these default methods.

Question: The form of an object invocation method inside OC

is the bracket.

[Method of object being called];

This is the form, and in Java it is the object. (point) method.


Troubled me for several days of Doubt:-(Ibaction) Iboutlet

Reference http://blog.csdn.net/allankin/article/details/7982146 suggest to see, it is said in the previous version of Xcode, no relationship, mainly look at the idea, after reading to see my summary is better.

Ibaction format:-(ibaction) method name is generally a ibaction return value, but on-line check, ibaction and void use effect is no different.

Iboutlet format: Iboutlet view variable iboutlet is only used to decorate a view variable, such as a lable variable button variable.

IPhone OS phone has a loop listener, it will listen to the user on the phone a variety of operations, and then it to do the response, open the Baidu app, enter the password, to determine that these are human-computer interaction is to use ibaction to define.

If you define the parameters (shape, size, etc.) for a view such as button or lable in ViewController.h, this is the case with Iboutlet to decorate your own defined views and then use CTRL to associate them.

Human-Computer interaction with ibaction, modify the view with Iboutlet.


UI knowledge Learned: Uialertview hint view

Reference http://blog.csdn.net/enuola/article/details/7900346 written in great detail.


Practical tips:

1. Outbound iOS Simulator:xcode in the top menu bar of Mac Xcode-open Developertool-ios Simulator (Manual outbound iOS simulator)

2. Simulator's home key: can be used on top of the Mac menu bar, or you can use shortcut keys Shift+cmd+h

3. Change the color: whether it is changing the background color of the view interface, font color, a variety of colors, you can change these colors in the Storybord, find it yourself, found the impressive, very good looking.

4. To add an image to the application, you need to prepare a picture of size 57*57, PNG, name icon, and save it to the supporting file (just below the Viewcontroller folder).

5. The shortcut key that is associated with the Viewcontroller button on the Storybord ctrl.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Program Log--ios "Hello World" program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.