如何在label中做按钮跳转ios

如何在label中做按钮跳转ios,第1张

as3.0的写法: 做一个按钮,实例名字取“button” 在脚本上写这些代码: button.addEventListener(MouseEvent.CLICK,clickHandle) function clickHandle(e:MouseEvent):void { //跳到第3帧并播放 gotoAndPlay(3)//跳到第3帧停止 //gotoAndPlay(3)//如果帧有名字比如叫“page” //gotoAndPlay("page")}

在这些UIImageView,UIView,UITextField,UILabel,UIButton学完了之后,记得最深的就是UITextField中可以直接添加边框的方法是 textField.borderStyle。

那么其他的空间设置边框设置记得不清的原因是因为 中间有个layer。下面看下具体的 *** 作:

用UILabel来举例子:

// 设置 label 的边框

_upLabel . layer . borderColor =[[ UIColor grayColor ] CGColor ] // 边框的颜色

_upLabel . layer . borderWidth = 1 // 边框的宽度

//给label的边框 设置圆角

_upLabel . layer . masksToBounds = YES

_upLabel . layer . cornerRadius = 10 // 设置圆角大小

以上应该注意的是Laber的宽度 . layer . borderWidth必须设置,且为正数,不然运行界面是不显示的。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11878481.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-19
下一篇2023-05-19

发表评论

登录后才能评论

评论列表(0条)

    保存