12.18.02 uiapplication

Source: Internet
Author: User

//

Viewcontroller.m

12.18.02 uiapplication

//

Created by Zhang Kaize on 15/12/18.

COPYRIGHT©2015 year Rytong_zkz. All rights reserved.

//

#import "ViewController.h"

@interface Viewcontroller ()

-(ibaction) Clicktap;

@end

@implementation Viewcontroller

-(void) Viewdidload {

[Super Viewdidload];

Additional setup after loading the view, typically from a nib.

}

-(void) didreceivememorywarning {

[Super didreceivememorywarning];

Dispose of any resources the can be recreated.

}

Whether the status bar is displayed Yes is not displayed

-(BOOL) Prefersstatusbarhidden

//{

return YES;

//}

Status bar Style

-(Uistatusbarstyle) Preferredstatusbarstyle

{

Return uistatusbarstylelightcontent;//font is white

}

-(ibaction) Clicktap {

UIApplication * app = [uiapplication sharedapplication];

1.bageValue

float Version = [[[Uidevice Currentdevice] systemversion] floatvalue];

if (version >= 8.0) {

Uiusernotificationsettings *settings = [Uiusernotificationsettings Settingsfortypes:uiusernotificationtypebadge Categories:nil];

[[UIApplication sharedapplication] registerusernotificationsettings:settings];

app.applicationiconbadgenumber=10;

}else

{

app.applicationiconbadgenumber=10;

}

Clear Bagevalue make it equal to app.applicationiconbadgenumber=0

2. Show Network status

app.networkactivityindicatorvisible = YES;

Call

Send e-mail

3. status bar in config file View controller-based status bar appearance set to No

[App Setstatusbarhidden:yes Withanimation:uistatusbaranimationfade];

[App Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes];

App.statusbarstyle = Uistatusbarstyledefault;

}

@end

12.18.02 uiapplication

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.