Mobile QQ bottom section bar effect "tab bar"

Source: Internet
Author: User

Appdelegate.m

appdelegate.m//task5////Created by Lyb on 14-9-27.//Copyright (c) 2014 imac. All rights reserved.//#import "AppDelegate.h" #import "FirstViewController.h" #import "SecondViewController.h" @ Implementation appdelegate-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (    Nsdictionary *) launchoptions{Self.window = [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]];    Override point for customization after application launch.    Self.window.backgroundColor = [Uicolor Whitecolor];        [Self.window makekeyandvisible];    Firstviewcontroller *firstctrl = [[Firstviewcontroller alloc] init];        Secondviewcontroller *secondctrl =[[secondviewcontroller alloc] init];    Uinavigationcontroller *NAVCTRL1 = [[Uinavigationcontroller alloc] Initwithrootviewcontroller:firstctrl];        Uinavigationcontroller *NAVCTRL2 = [[Uinavigationcontroller alloc] Initwithrootviewcontroller:secondctrl]; Uitabbarcontroller *tabbarctrl = [[UitabbarcontRoller alloc] init];        Tabbarctrl.viewcontrollers = @[navctrl1, navCtrl2];        Self.window.rootViewController = Tabbarctrl; return YES;} @end

Firstviewcontroller.m

-(void) viewdidload{    [Super Viewdidload];    Self.title = @ "left";        Self.view.backgroundColor = [Uicolor redcolor];}

Secondviewcontroller.m

#import "SecondViewController.h" #import "ThirdViewController.h" @interface Secondviewcontroller () @ End@implementation secondviewcontroller-(ID) initwithnibname: (NSString *) Nibnameornil Bundle: (NSBundle *) nibbundleornil{self    = [super Initwithnibname:nibnameornil Bundle:nibbundleornil];    if (self) {        self.title = @ "right";    }    return self;} -(void) viewdidload{    [Super Viewdidload];        Self.view.backgroundColor = [Uicolor greencolor];        UIButton *button = [UIButton buttonwithtype:uibuttontypecontactadd];    Button.frame = CGRectMake (All-in-all;    [Button addtarget:self action: @selector (Buttonaction) forcontrolevents:uicontroleventtouchupinside];    [Self.view Addsubview:button];} -(void) buttonaction{    thirdviewcontroller *thirdctrl = [[Thirdviewcontroller alloc] init];        [Self.navigationcontroller Pushviewcontroller:thirdctrl animated:yes];}

Thirdviewcontroller.m

-(ID) Initwithnibname: (NSString *) Nibnameornil Bundle: (NSBundle *) nibbundleornil{self    = [Super Initwithnibname: Nibnameornil Bundle:nibbundleornil];    if (self) {        //Hides tab bar toolbar        self.hidesbottombarwhenpushed = YES;    }    return self;} -(void) viewdidload{    [Super Viewdidload];    Self.view.backgroundColor = [Uicolor orangecolor];    Self.title = @ "three";    }


Mobile QQ bottom section bar effect "tab bar"

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.