[PickerView Case 13-Introduction to Application Objects Objective-C Language]

1. Introduction to application objects:

notify

1. Introduction to application objects:

notify

Application introduction:

notify

Application introduction:

notify

Application introduction:

notify

The process of application startup itself is not the end of application startup.

It has some more detailed things, such as:

1) info.plist and pch files

2) UIApplication object

We talk about this separately.

At the end, let’s summarize it again,

what's next:

notify

Just open this 2) UIApplication object:

notify

UIApplication object:

notify

Come and see:

notify

Come and see:

notify

Come and see:

notify

Come and see:

notify

Come and see:

notify

I create a project directly:

Command + Shift + N:

notify

Then: Single View, Next:

notify

Name: Application object introduction:

notify

Next:

notify

09 is there, it’s time for 10, click: Cancel:

This is the 10th copy:

notify

Name: 10-Application Object Introduction:

notify

Then what:

notify

Then what:

notify

2. Before talking about this application object, let me first perform a small operation on it:

notify

I first drag a button, and then, when I click the button, I perform another operation:

notify

Drag a button:

notify

Add its constraints:

notify

Horizontally centered, vertically centered:

notify

Update its constraints and click Add 2 Constraints:

notify

notify

Then, drag the line:

notify

Go back to the ViewController, then press the Control key and drag the line:

notify

is an implementation of:

notify

Then, what is it called: btnClick:

Name:btnClick:

notify

Then, change this Type: to UIButton:

notify

Type:UIButton:

Click Connect:

notify

- (IBAction)btnClick:(UIButton *)sender{

}

notify

With:

notify

Then, I deleted these two if they were not needed:

notify

Delete:

notify

We write directly here:

notify

Then, go back to the ViewController.m file:

notify

Go back to the ViewController.m file:

notify

3. Let’s take a look at this application object:

1) Type of application object: Object of type UIApplication:

notify

The object of the application, to put it bluntly, is our current application.

notify

For example, this application

Correspondingly, this is our entire application:

notify

Isn’t this a bit abstract? Mainly, it performs some application-level operations.

/**

1.Objects of UIApplication type, mainly perform application-level operations

*/

notify

1) For example: when we use QQ, WeChat, and Alipay, when you have new news, will it push it to you?

I sent some messages, and then I told you that I have information now,

There's new news, right?

But, this application avatar, this icon, this icon, does it have a number?

Tell you how many messages you have received,

At this time, you will force yourself to click, right?

This thing can be realized through our application object.

2) Also, when your mobile phone’s Internet connection is not good, is there a chrysanthemum in the upper left corner that keeps spinning:

notify

The indicator keeps turning, so this is also implemented through the application object.

/*

Guess you like

Origin blog.csdn.net/madoca/article/details/133633405