• 导航栏自定义一个UIBarButtonItem最快的方式


    1 + (UIBarButtonItem *)itemWithIcon:(NSString *)icon highIcon:(NSString *)highIcon target:(id)target action:(SEL)action
    2 {
    3     UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    4     [button setBackgroundImage:[UIImage imageWithName:icon] forState:UIControlStateNormal];
    5     [button setBackgroundImage:[UIImage imageWithName:highIcon] forState:UIControlStateHighlighted];
    6     button.frame = (CGRect){CGPointZero, button.currentBackgroundImage.size};
    7     [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    8     return [[UIBarButtonItem alloc] initWithCustomView:button];
    9 }
  • 相关阅读:
    Oracle函数题
    多态
    继承
    封装
    属性和修饰符
    方法重载
    构造方法
    类与实例
    SQL Server 2005 To Oracle
    Toad for Oracle 使用文档
  • 原文地址:https://www.cnblogs.com/qq449832375/p/4679061.html
Copyright © 2020-2023  润新知