1008- iOS之UIButton上图下文

需求要实现上图下文,现在写得是有点乱的了,以后再慢慢整理吧。

UIButton

A control that executes your custom code in response to user interactions.

Declaration

class UIButton : UIControl

Overview

设计一个UIButton的常规步骤:

When adding a button to your interface, perform the following steps:

  • Set the type of the button at creation time.      //创建之初,先设置button的风格

  • Supply a title string or image; size the button appropriately for your content.   //应用图片或者标题字符串来规划button

  • Connect one or more action methods to the button.   //连接一个或者多个 动作方法 来连接button

  • Set up Auto Layout rules to govern the size and position of the button in your interface. 

                                                                                                  //设置自动布局规则来规划你的button尺寸和位置

  • Provide accessibility information and localized strings.  //提供访问button的信息和本地化的字符串

点击按钮时的响应方式:

Buttons use the Target-Action(link) design pattern to notify your app when the user taps the button.

    Button是基于 目标-行为 的设计模式来通知你的app的,当客户点击按钮时就会触发该模式

Rather than handle touch events directly, you assign action methods to the button and designate which events trigger calls to your methods.

    Button不直接对事件进行响应,而是通过 你指定的方法 来响应 你指定的动作事件 。

You connect a button to your action method using the addTarget(_:action:for:)(link) method or by creating a connection in Interface Builder.

    你通过UIButton的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值