zoukankan      html  css  js  c++  java
  • 自定义UINavigationBar上面的按钮

    定制回退按钮

    1  UIImage *buttonBack30 = [[UIImage imageNamed:@"button_back_textured_30"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 13, 0, 5)];
    2  UIImage *buttonBack24 = [[UIImage imageNamed:@"button_back_textured_24"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 5)];
    3  [[UIBarButtonItem appearance] setBackButtonBackgroundImage:buttonBack30
                                                      forState:UIControlStateNormal
                                                    barMetrics:UIBarMetricsDefault];
    4  [[UIBarButtonItem appearance] setBackButtonBackgroundImage:buttonBack24
                                                      forState:UIControlStateNormal
                                                    barMetrics:UIBarMetricsLandscapePhone];
    

    设置右侧按钮

    1 UIImage *button30 = [[UIImage imageNamed:@"button_textured_30"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
    2 UIImage *button24 = [[UIImage imageNamed:@"button_textured_24"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];
    3 [[UIBarButtonItem appearance] setBackgroundImage:button30
    4                                             forState:UIControlStateNormal
    5                                           barMetrics:UIBarMetricsDefault];
    6 [[UIBarButtonItem appearance] setBackgroundImage:button24
    7                                             forState:UIControlStateNormal
    8                                           barMetrics:UIBarMetricsLandscapePhone];
  • 相关阅读:
    NEO从入门到开窗(4)
    NEO从入门到开窗(3)
    NEO从入门到开窗(2)
    NEO从入门到开窗(1)
    重读大型网站技术架构
    c#并行编程
    关于使用CPU缓存的一个小栗子
    Visual Studio中从应用程序中调试SQL脚本
    JavaScript启示录
    LabVIEW工控二进制数据存储
  • 原文地址:https://www.cnblogs.com/sell/p/2915535.html
Copyright © 2011-2022 走看看