iOS learning begins with finishing

Source: Internet
Author: User

IOS Some basics

Everything is object:IOS is an object-oriented process

A picture is a picture object (UIimage object )

Text is a literal object (Uitextfield object)

A button is a button object (UIbutton object )

UIimage,Uitextfield, UIbutton, these belong to UIview.

child controls and parent controls are relatively relative, and if there is no parent control there is no child control and vice versa.

Uiviewcontrol was the housekeeper, and his responsibility was

The position of the arrow is the entrance to the program

The UI is the foundation, the network is the focus,Jason/xml

First small item, subtraction calculator

Designed to be

two Text control, three Label control, one button control

< Span style= "FONT-SIZE:16PX;" >text and label is text It is possible to enter a number in the run interface, while the label is a fixed text or number

When you want to listen to the button 's Click event, you need to use the ibaction function, declared in the . h file, implemented in . M :

statement:-(ibaction)count;

implementation:-(ibaction)count{

NSlog (@ "I saw an angel, he name is Mama");// This is the print I saw an angel, he name is Mama, this sentence to determine whether the Click event was successful

}

To implement a click event for a listener button, you also need to wire the Mainstoryboard button control to output I saw an angel after clicking the button . His name is Mama


This article from "My 51 Blog Park" blog, reproduced please contact the author!

iOS learning begins with finishing

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.