[PickerView Case 13-Introduction to Application Objects Objective-C Language]
Mobile
2023-12-16 19:24:07
views: null
1. Introduction to application objects:
1. Introduction to application objects:
Application introduction:
Application introduction:
Application introduction:
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:
Just open this 2) UIApplication object:
UIApplication object:
Come and see:
Come and see:
Come and see:
Come and see:
Come and see:
I create a project directly:
Command + Shift + N:
Then: Single View, Next:
Name: Application object introduction:
Next:
09 is there, it’s time for 10, click: Cancel:
This is the 10th copy:
Name: 10-Application Object Introduction:
Then what:
Then what:
2. Before talking about this application object, let me first perform a small operation on it:
I first drag a button, and then, when I click the button, I perform another operation:
Drag a button:
Add its constraints:
Horizontally centered, vertically centered:
Update its constraints and click Add 2 Constraints:
Then, drag the line:
Go back to the ViewController, then press the Control key and drag the line:
is an implementation of:
Then, what is it called: btnClick:
Name:btnClick:
Then, change this Type: to UIButton:
Type:UIButton:
Click Connect:
- (IBAction)btnClick:(UIButton *)sender{
}
With:
Then, I deleted these two if they were not needed:
Delete:
We write directly here:
Then, go back to the ViewController.m file:
Go back to the ViewController.m file:
3. Let’s take a look at this application object:
1) Type of application object: Object of type UIApplication:
The object of the application, to put it bluntly, is our current application.
For example, this application
Correspondingly, this is our entire application:
Isn’t this a bit abstract? Mainly, it performs some application-level operations.
/**
1.Objects of UIApplication type, mainly perform application-level operations
*/
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:
The indicator keeps turning, so this is also implemented through the application object.
/*
Origin blog.csdn.net/madoca/article/details/133633405