UIApplication, Appdelegate, entrustment, etc.?What is a delegate? Why should we have a commission? What is the implementation mechanism of the Commission on the iphone?In general, we created an iphone project, which has the MAIN.M class by default, and we all know that a main () method represents the portal of an application,The following is the method body for the corresponding MAIN.M:[OBJC]View PlainCopy
int main (int argc, charchar *argv[
Original: http://blog.csdn.net/huifeidexin_1/article/details/7792371The iphone application is initiated by the main function main, which is responsible for invoking the Uiapplicationmain function, as shown in the following form:int Uiapplicationmain (int argc,Char *argv[],NSString *principalclassname,NSString *delegateclassname);So what exactly does the Uiapplicationmain function do? This function is mainly responsible for three things:1) initializes the application object from the given class
In many cases, we do not need to care about this class. We seldom inherit this class and occasionally call the APIs of this class to implement some functions, but it is undeniable that, this class is a very important concept in IOS programming. So I will write this article here to summarize the information of this class. If something is wrong, leave a message. Thank you.
The core function of uiapplication is to provide control and collaborative work d
uiapplication, Appdelegate, entrustment, etc.? What is a delegate? Why should we have a commission?What is the implementation mechanism of the Commission on the iphone? in general, we created an iphone project, which has the MAIN.M class by default, and we all know that a main () method represents the portal of an application,The following is the method body for the corresponding MAIN.M:int main (int argc, char *argv[]){@autoreleasepool {return Uiappl
Since contact with iOS soon, although the project can be done, but for uiapplication, appdelegate These concepts are not very familiar with, this morning to summarize, find a good blog post, I share it. What is a delegate? Why should we have a commission? What is the implementation mechanism of the Commission on the iphone? > In general, we created an iphone project that has the MAIN.M class by default, and we all know that a main () method
1. What is UIApplication
The uiapplication object is symbolic of the application, cannot be created manually, cannot alloc init, and an application allows only one .
Each app has its own uiapplication object, and it's a singleton .
This singleton object can be obtained by [uiapplication shareapplica
If you do not want the IPhone to enter the lock screen standby when the app is running, add the following line of code[[UIApplication sharedapplication] setidletimerdisabled:yes];By the way, learning the nextuiapplication. The iphone application is initiated by main function main, which is responsible for invokingUiapplicationmainfunction, the form of the function is as follows:Align Uiapplicationmain, option+ mouse click. can be viewed.So what exactl
uiapplication Simple to understand literally is the application, development time will sometimes call the method in the way, it looks inconspicuous, the actual iOS development UIApplication provides control and collaboration during the operation of the iOS program. Each application must have only one instance of UIApplication (or its subclasses) at run time, whic
UIApplication in-depth researchMany times, we do not need to care about this class, we rarely inherit this class, occasionally call this class API to implement some functions, but admittedly, this class is an important concept in iOS programming, so I write this article here to summarize the following information about this class, if the wrong place, please leave a message, thank you.The core role of UIApplication
UIApplication and proxy for iOS learning, iosuiapplication1. What is UIApplication?
A UIApplication object is a symbolic object of an application. It cannot be created manually or alloc init. Only one application can be created.
Each application has its own UIApplication object and is a singleton.
You can use [
applicationEach application has its own UIApplication object, and it is a singletonThis singleton object can be obtained by [UIApplication Sharedapplication][OBJC]View Plaincopy
uiapplication *app=[uiapplicationNBSP;SHAREDAPPLICATION];NBSP;NBSP;
uiapplication*app1 =[uiapplicationNBSP;SHAREDAPPLICATION
One: uiapplication: Single case (more on the article in the following example, as you can now know, the Singleton has only one object throughout the application's life cycle).App start-up processAfter opening the program-"
1:main function
2:uiapplicationmain function
3: Initialize UIApplication (Create)
4: Set the ui
More often than not, we don't have to care about this class, we rarely inherit this class, and occasionally call this class's API to implement some functionality, but admittedly, this class is an important concept in iOS programming. The core role of UIApplication is to provide control and collaboration during the operation of the iOS program.Each program must have an instance of UIApplication (or its subcl
UIApplication and iosuiapplication for iOS development
The core function of UIApplication is to provide control and collaborative work during iOS program running.
The iPhone application is started by the main function. It is responsible for calling the UIApplicationMain function. The function is as follows:Int UIApplicationMain (Int argc,Char * argv [],NSString * principalClassName,NSString * delegateClassN
During the development process, we need some global objects to connect each part of the program. The most important of these global objects is the uiapplication object. But in actual programming, we do not deal with the uiapplication object directly, but with its proxy.
UiapplicationIs the start of the iPhone application and is responsible for initializing and displaying the uiwindow, and is responsible for
"UIKit" appdelegateCalled after the application has finished launching (only once, only when the program is opened for the first time)-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions{ Create a UIWindow cgrect rect = [[UIScreen mainscreen] bounds]; Self.window = [[UIWindow alloc] initwithframe:rect]; Set background color Self.window.backgroundColor = [Uicolorredcolor]; In
UIApplication Introduction
UIApplication objects are symbols of the application
Each application has its own UIApplication object, which is a singleton object that can be [UIApplication sharedApplication] obtained and cannot be created with Alloc
The first object created after a program is started is a
1 , overviewThe UIApplication object is a symbol of the application. Each application has its own UIApplication object, and it is a singleton (only one object, we cannot create a new object, we can only get this object). This singleton object can be obtained by [UIApplication Sharedapplication]. a IOS the first object created after a program is started is
directory of this document
1. Program configuration file Info.plist, global header file PCH
2. Application Object UIApplication Introduction
3.UIApplicationDelegate Introduction, program start-up process
4.UIWindow objects
5. Process of Program Interface display
6. Summary procedure to start the complete process
-1. Program configuration file Info.plist, global header file PCH1. Program configuration file Info.plist
Tag: Class C tar a int width41.UIApplication and delegate42.UIPickerView43.UIDatePicker44. The complete process of program initiation45.UIApplicationMain46.UIWindow47. How to create a controller48. Delay loading of the controller view49. Multi-ControllerSteps to use 50.UINavigationController{These days have been catching the project, and today finally idle down!Today is a good day, 2014520 of the sky in space.Then let's look at the love of our program
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.