Learning iOS Development UI--Program startup principle

Source: Internet
Author: User

iOS program startup process

UIApplication:

1. Each application has its own UIApplication object, and it is a singleton, and the singleton object can be obtained by [uiapplication sharedapplication]. Common Properties of 2.UIApplication:

@property (nonatomic) Nsinteger applicationiconbadgenumber;

@property (nonatomic,getter=isnetworkactivityindicatorvisible) BOOL networkactivityindicatorvisible;

Common methods of 3.UIApplication:

UIApplication *app = [UIApplication sharedapplication];

You can control the style of the status bar, whether it is displayed (need to modify the system Info.pliast file), Uiviewcontroller can operate

[App Openurl:[nsurl urlwithstring:@ "tel://10086"], phone @ "sms://10086" SMS @ "Mailto://[email Protected] " Mail : @" http://ios.itcast.cn " Web page

UIWindow:

1 Common methods:

-(void) Makekeywindow;

Make current UIWindow into Keywindow (main window)

-(void) makekeyandvisible;

Make the current UIWindow into Keywindow and show [UIApplication sharedapplication].windows, the UIWindow list opened in this app, This allows you to touch any of the UIView objects in your app (the keyboard that pops up in a new UIWindow when you normally enter text)

[UIApplication Sharedapplication].keywindow, a UIWindow for receiving keyboard and non-touch message events, and only one uiwindow at a time in a program is Keywindow. If a text box inside a UIWindow cannot enter text, it may be because this uiwindow is not a Keywindow four-object diagram

  

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.