当前位置: 首页 > news >正文

o2o网站建设市场互联网建设发展

o2o网站建设市场,互联网建设发展,做自己看视频的网站,wordpress 免费主题前言 本来没有打算写这篇文章的, 主要是因为在工作中遇到一些同事再用 有UIButton的时候, 有些很基本的,系统API提供的都不知道, 例如 如何让UIButton的文字居上,居左, 居右, 居下对其等一些基本点, 为此我特地写了一下UIButton小结 UIButton回顾 继承关系 NSObject - UIRe…前言 本来没有打算写这篇文章的, 主要是因为在工作中遇到一些同事再用 有UIButton的时候, 有些很基本的,系统API提供的都不知道, 例如 如何让UIButton的文字居上,居左, 居右, 居下对其等一些基本点, 为此我特地写了一下UIButton小结 UIButton回顾 继承关系 NSObject - UIResponder - UIView - UIControl - UIButton 复制代码API 初始化 遍历构造器 (instancetype)buttonWithType:(UIButtonType)buttonType; 复制代码button类型 typedef NS_ENUM(NSInteger, UIButtonType) {UIButtonTypeCustom 0, //自定义风格UIButtonTypeSystem NS_ENUM_AVAILABLE_IOS(7_0), //系统样式从iOS7开始使用UIButtonTypeDetailDisclosure, //蓝色小箭头按钮主要做详细说明用UIButtonTypeInfoLight, //亮色感叹号UIButtonTypeInfoDark, //暗色感叹号UIButtonTypeContactAdd, //十字加号按钮UIButtonTypeRoundedRect UIButtonTypeSystem, //圆角矩形从iOS7废弃iOS6中可以使用}; 复制代码偏移量 内容偏移量正值表示间隔值负值表示超出参照物的距离。UIEdgeInsetsMake(top, left, bottom, right)有四个值需要设置分别距离上左下右边的间隔。 // default is UIEdgeInsetsZero. On tvOS 10 or later, default is nonzero except for custom buttons. property(nonatomic) UIEdgeInsets contentEdgeInsets UI_APPEARANCE_SELECTOR; 复制代码标题偏移量和图片偏移量是相对的比如自定义一个按钮实现的效果是图片在左边标题在右边可以用这个属性设置完标题偏移量图片偏移量就是相对于标题的 property(nonatomic) UIEdgeInsets titleEdgeInsets; // default is UIEdgeInsetsZero 复制代码图片偏移量 property(nonatomic) UIEdgeInsets imageEdgeInsets; 复制代码其他API button的状态为高亮时文本的阴影会反转 默认是NO property(nonatomic) BOOL reversesTitleShadowWhenHighlighted; 复制代码button的状态为高亮时图像变暗 默认是YES property(nonatomic) BOOL adjustsImageWhenHighlighted; 复制代码button的状态为禁用时图像变暗。默认是YES property(nonatomic) BOOL adjustsImageWhenDisabled; 复制代码button的状态为高亮时发光。默认是NO property(nonatomic) BOOL showsTouchWhenHighlighted; 复制代码系统的一些样式DetailDisclosure InfoLight InfoDark ContactAdd颜色会改变 property(nonatomic,retain) UIColor *tintColor NS_AVAILABLE_IOS(5_0); 复制代码button的状态。包括一些其他的控制的状态 typedef NS_OPTIONS(NSUInteger, UIControlState) {UIControlStateNormal 0, //正常状态UIControlStateHighlighted 1 0, //高亮状态UIControlStateDisabled 1 1, //禁用状态UIControlStateSelected 1 2, //选中状态UIControlStateApplication 0x00FF0000,UIControlStateReserved 0xFF000000 }; 复制代码// 设置标题 default is nil. title is assumed to be single line - (void)setTitle:(nullable NSString *)title forState:(UIControlState)state; // 设置标题颜色 default if nil. use opaque white - (void)setTitleColor:(nullable UIColor *)color forState:(UIControlState)state UI_APPEARANCE_SELECTOR;// 设置标题阴影颜色default is nil. use 50% black - (void)setTitleShadowColor:(nullable UIColor *)color forState:(UIControlState)state UI_APPEARANCE_SELECTOR; // 设置图片default is nil. should be same size if different for different states - (void)setImage:(nullable UIImage *)image forState:(UIControlState)state; // 设置背景图片// default is nil - (void)setBackgroundImage:(nullable UIImage *)image forState:(UIControlState)state UI_APPEARANCE_SELECTOR; // 设置富文本标题default is nil. title is assumed to be single line - (void)setAttributedTitle:(nullable NSAttributedString *)title forState:(UIControlState)state NS_AVAILABLE_IOS(6_0); 复制代码// 返回不同状态下标题 - (nullable NSString *)titleForState:(UIControlState)state;// 返回不同状态下标题颜色 - (nullable UIColor *)titleColorForState:(UIControlState)state;// 返回不同状态下标题阴影颜色 - (nullable UIColor *)titleShadowColorForState:(UIControlState)state;// 返回不同状态下图片 - (nullable UIImage *)imageForState:(UIControlState)state;// 返回不同状态下背景图片 - (nullable UIImage *)backgroundImageForState:(UIControlState)state;// 返回不同状态下富文本标题 - (nullable NSAttributedString *)attributedTitleForState:(UIControlState)state NS_AVAILABLE_IOS(6_0);复制代码// button的当前标题。当按钮状态改变时值自动改变可以做判断当前标题是全文则点击展开标题设置为收起当前标题是收起则点击收起全文。 property(nullable, nonatomic,readonly,strong) NSString *currentTitle; // 当前标题颜色default is white(1,1) property(nonatomic,readonly,strong) UIColor *currentTitleColor; // 当前状态下标题阴影颜色 property(nullable, nonatomic,readonly,strong) UIColor *currentTitleShadowColor; // 当前状态下图片 切换不同图片比如做单选多选可以使用。 property(nullable, nonatomic,readonly,strong) UIImage *currentImage; property(nullable, nonatomic,readonly,strong) UIImage *currentBackgroundImage; property(nullable, nonatomic,readonly,strong) NSAttributedString *currentAttributedTitle NS_AVAILABLE_IOS(6_0); 复制代码property(nullable, nonatomic,readonly,strong) UILabel *titleLabel NS_AVAILABLE_IOS(3_0); property(nullable, nonatomic,readonly,strong) UIImageView *imageView NS_AVAILABLE_IOS(3_0); 复制代码// 返回背景绘制区域 - (CGRect)backgroundRectForBounds:(CGRect)bounds;// 返回内容绘制区域。内容区域是显示图片和标题及他们特定对齐缩放等的范围 - (CGRect)contentRectForBounds:(CGRect)bounds;// 返回标题的绘制区域 - (CGRect)titleRectForContentRect:(CGRect)contentRect;// 返回图片的绘制区域 - (CGRect)imageRectForContentRect:(CGRect)contentRect; 复制代码这个地方的API是UIControl的, 很多人并没有在意这个类, 然后用一些很笨的手段去解决对其方式 // button 内容垂直对其方式 default is center property(nonatomic) UIControlContentVerticalAlignment contentVerticalAlignment; // button 内容水平对其方式 default is center property(nonatomic) UIControlContentHorizontalAlignment contentHorizontalAlignment; 复制代码转载于:https://juejin.im/post/5aa53fb86fb9a028dd4ddaf3
http://www.sadfv.cn/news/88228/

相关文章:

  • 连云港市电信网站建设绵阳企业网站建设
  • h5企业模板网站模板网站建设 美食站点
  • wordpress全站迁移中国化学工程第三建设有限公司
  • 专门做搞笑视频的网站php响应式网站开发教程
  • 网站优化qq群wordpress4.9.8升级包
  • 个人网站设计摘要网络整合推广营销
  • 网站开发多久完成外贸网站建设公司哪家好
  • 北京网站优化服务商贵州省网站建设选哪家
  • 深圳 网站制作 哪家线上免费logo设计
  • jsp网站连接数据库做哪种类型的网站赚钱呢
  • 手机网站模板网国家企业信用信息公示系统官网四川
  • 石岩做网站公司外包公司和正式员工待遇
  • 建设英文网站要求游戏创业项目
  • 深圳网站建设外贸公司价格微网站 手机网站
  • 如何去除网站外链武夷山网页设计
  • 做网站爱广州快速排名
  • 衡水武邑县建设局网站网站开发与应用案例教程
  • 在自己的网站做百度搜索框合肥网站建设过程
  • 网站开发建设合同网站 正在建设中
  • 企业网站建设价格表浏览器怎样屏蔽网站
  • 受欢迎的邯郸网站建设专门做win7的网站
  • 免费建手机网站500m主机空间能做视频网站吗
  • 做那个免费观看视频网站企业申报系统
  • 创建一个网站需要怎么做有哪些网站做的很有特色
  • 用服务器建立网站合肥网络seo
  • 建设银行信用卡管理中心网站首页ps做网站
  • 程序员就是做网站的吗网络教育网站如何做营销推广
  • 自己做一个模版网站是怎么做的wordpress 添加xml
  • 产品图案设计网站网站建设的方式有哪些内容
  • 深圳市门户网站建设品牌网站开发方向和移动开发方向那个好