(source code) Cat Learn iOS (21) UIApplication Set program icon on top right? Red Digital _ finger-pointing device, etc.

Source: Internet
Author: User

Cat Share, must boutique

Material code Address: http://download.csdn.net/detail/u013357243/8602889
Original articles, welcome reprint. Reprint Please specify: Sanayu's Blog
Address: http://blog.csdn.net/u013357243?viewmode=contents

Effect

Source
////NJVIEWCONTROLLER.M//06-uiapplication////Created by Apple on 14-6-3.//Copyright (c) 2014 Heima. All rights reserved.//#import "NJViewController.h"  @interface njviewcontroller ()@end @implementation njviewcontroller - (void) viewdidload{[SuperViewdidload];additional setup after loading the view, typically from a nib.//UIApplication *app = [uiapplication sharedapplication];//UIApplication *APP1 = [uiapplication sharedapplication];////uiapplication *app2 = [[UIApplication alloc] init];//NSLog (@ "%p-%p", app, App1);    UIButton*BTN = [[UIButtonAlloc] Initwithframe:cgrectmake ( -, -, -, -)]; [Btn settitle:@"point me."Forstate:uicontrolstatenormal]; [BTN AddTarget: SelfAction@selector(OnClick) forcontrolevents:uicontroleventtouchupinside]; Btn. BackgroundColor= [UicolorRedcolor]; [ Self. ViewADDSUBVIEW:BTN];} - (void) onclick{//NSLog (@ "was ordered");    uiapplication*app = [uiapplicationSharedapplication];//Set the number on the application icon//App.applicationiconbadgenumber = 998;    //Set up Networking animations for the status bar//app.networkactivityindicatorvisible = YES;    //Set the style of the status bar    //App.statusbarstyle = uistatusbarstylelightcontent;//[app Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes];    //Set whether the status bar is hidden//App.statusbarhidden = YES;//[app Setstatusbarhidden:yes Withanimation:uistatusbaranimationfade];    /* URL: Uniform Resource Locator, which is used to uniquely represent a resource URL: protocol header://Host address/resource Path network resource: Http://www.baidu.com/images/20140603/abc.png Local Resources: File:///users/apple/desktop/abc.png */    Nsurl*url = [Nsurlurlwithstring:@"Http://www.baidu.com"]; [App Openurl:url];}//-(uistatusbarstyle) Preferredstatusbarstyle//{//return uistatusbarstylelightcontent;//}//-(BOOL) Prefersstatusbarhidden//{//return YES;//}@end

PS: New iOS Exchange Learning Group: 304570962 can add cat qq:1764541256 or Znycat Let's study hard together.
Sanayu's Blog
Address: http://blog.csdn.net/u013357243?viewmode=contents

(source code) Cat Learn iOS (21) UIApplication Set program icon on top right? Red Digital _ finger-pointing device, etc.

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.