iOS Weibo build

Source: Internet
Author: User

Create a program loading interface

-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions{    1> Create window    self.window = [[UIWindow alloc] Initwithframe:[uiscreen mainscreen].bounds];    2> the root controller of the Setup window    uitabbarcontroller *tabbarcontroller = [[Uitabbarcontroller alloc] init];    Self.window.rootViewController = Tabbarcontroller;    3> display window    [Self.window makekeyandvisible];    return YES;}
launchimage ConfigurationThe detailed configuration of Launchimage is documented in the Contents.json file under the Launchimage.launchimage file:



Cancel app icon rendering

Hide the status bar when the program loads

You can call [application Setstatusbarhidden in the Didfinishlaunchingwithoptions method After the program is loaded to restore the status bar display. :NO] method;

Rendering Pictures

In IOS7, the picture of SelectedImage will be rendered blue again, if you want to display the original image, you must cancel the rendering;

To cancel the rendering call method:

SelectedImage = [SelectedImage imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];

How to differentiate between IOS6 and iOS7

#define IOS7 ([[Uidevice currentdevice].systemversion Doublevalue] >= 7.0), generally placed in itcastweibo-prefix.pch

How to set different pictures according to IOS6 and iOS7, such as: Ios6 picture is convex out, iOS7 is flat

Write a category #import "Uiimage+mj.h" @implementation UIImage (MJ) + (UIImage *) Imagewithname: (NSString *) name{    if (iOS7) {        nsstring *newname = [name stringbyappendingstring:@ "_os7"];        UIImage *image = [UIImage imagenamed:newname];        if (image = = nil) {//Picture with no _os7 suffix            image = [UIImage imagenamed:name];        }        return image;        Non-iOS7    return [UIImage imagenamed:name];} Get different pictures by category//Set the selected icon    UIImage *selectedimage = [UIImage imagewithname:selectedimagename];    if (iOS7) {        childVc.tabBarItem.selectedImage = [SelectedImage imagewithrenderingmode: Uiimagerenderingmodealwaysoriginal];    } else {        childVc.tabBarItem.selectedImage = selectedimage;    }


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.