zoukankan      html  css  js  c++  java
  • UIButton状态:添加图片:

    UIButton状态:
    UIControlStateNormal          // 正常状态  
    UIControlStateHighlighted     // 高亮状态  
    UIControlStateDisabled        // 禁用状态   
    UIControlStateSelected        // 选中状态   
    UIControlStateApplication     //    
    UIControlStateReserved        // 保留状态
    UIButton类型:
    UIButtonTypeCustom            //自定义类

    添加图片:
    灰色背景颜色:
    UIButtonTypeRoundedRect       //圆角类型
     UIButtonTypeDetailDisclosure   //细节展示按钮

    UIButtonTypeInfoLight          //浅色背景的信息按钮

    UIButtonTypeInfoDark           //暗色背景的信息按钮

    UIButtonTypeContactAdd         // 添加按钮

    创建UIButton 1. UIButton *button = [[UIButton alloc] initWithFrame: CGRectMake (x, y, Width, Height)];      2. UIButton *button = [[UIButton buttonWithType:UIButtonTypeCustom] retain];    设置UIButton标题 [button setTitle:title forState:UIControlStateNormal];      设置UIButton标题颜色 [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];   设置UIButton背景图片 [button setBackgroundImage:newImage forState:UIControlStateNormal];   设置UIButton背景颜色 button.backgroundColor = [UIColor clearColor];

    236635.png

    通知中心:-订阅通知-移除订阅-发送通知

     
  • 相关阅读:
    保持简单----纪念丹尼斯•里奇(Dennis Ritchie)
    转:有关retina和HiDPI那点事
    Powershell 学习
    Windows与Linux共享文件夹互相访问
    你知道C语言为什么会有“_”(下划线)吗?
    百度公共DNS
    AXIS2的一些认识
    待整理
    java复习汇总之面试篇
    落网歌曲图片下载
  • 原文地址:https://www.cnblogs.com/quwujin/p/4770661.html
Copyright © 2011-2022 走看看