• IOS7开发~新UI学起(二)


    本文转载至 http://blog.csdn.net/lizhongfu2013/article/details/9133281

    1、UINavigationBar:

     

     

        NSDictionary* attrs = @{NSForegroundColorAttributeName: [UIColorblackColor],

                                NSFontAttributeName: [UIFontfontWithName:@"AmericanTypewriter"size:0.0],

                                };

        [[UINavigationBar appearancesetTitleTextAttributes:attrs];

        [[UINavigationBar appearancesetTintColor:[UIColorredColor]];

        

        UINavigationBar *navBar = [[UINavigationBaralloc]init];

        navBar.frame = CGRectMake(0,50,32044);

        

        [navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];

        [navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];

        [navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];

        [navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];

     

        [navBar setBarStyle:UIBarStyleDefault];

        [navBar setBackgroundImage:[UIImageimageNamed:@"bg.png"]forBarMetrics:UIBarMetricsDefault];

        [self.view addSubview:navBar];

     

        

     

    2、UIProgressView

     

     



    {

        progress = [[UIProgressViewalloc]initWithFrame:CGRectMake(10,100,300,10)];

        [progresssetProgressImage:[UIImageimageNamed:@"bg.png"]];

        [progresssetProgressViewStyle:UIProgressViewStyleBar];

        [progresssetTrackImage:[UIImageimageNamed:@"sss.png"]];

        [self.viewaddSubview:progress];

        

        [NSTimer scheduledTimerWithTimeInterval:1.0target:selfselector:@selector(run)userInfo:nilrepeats:YES]; 

        

    }

     

    -(void) run

    {

        progress.progress +=0.1;

        [progresssetProgress:progress.progressanimated:YES];

    }

     

     

    2、UISearchbar

     

        UISearchBar *searchBar = [[UISearchBaralloc]initWithFrame:CGRectMake(0,20,320,44)];

        [searchBar setBarStyle:UIBarStyleDefault];

        [searchBar setBarTintColor:[UIColorredColor]];

        [searchBar setBackgroundImage:[UIImageimageNamed:@"bg.png"]

                       forBarPosition:UIBarPositionAny

                           barMetrics:UIBarMetricsDefault];

        

        searchBar.showsCancelButton =YES;

        [self.view addSubview:searchBar];

     

  • 相关阅读:
    实验六
    派生类构造函数的理解
    实验五
    随机数
    面向行的输入(随时添加新的理解)
    实验四
    循序渐进VUE+Element 前端应用开发(21)--- 省市区县联动处理的组件使用(转载)
    循序渐进VUE+Element 前端应用开发(20)--- 使用组件封装简化界面代码(转载)
    循序渐进VUE+Element 前端应用开发(19)--- 后端查询接口和Vue前端的整合(转载)
    循序渐进VUE+Element 前端应用开发(18)--- 功能点管理及权限控制 (转载)
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/3429181.html
Copyright © 2020-2023  润新知