iOS 的tag说明,看到有些使用tag,将tag的值设置为10000 这么大的值,我感觉可能是写这个值得怕这个tag已经被别的控件使用,因此设的大点,不过这样使用的可能是没有搞清楚tag的作用范围,tag的作用范围不是整个App的而是这个View及其SubView,苹果官方的解释是:
object-c
– ( a logicalPath=’//apple_ref/doc/c_ref/__kindof’ href=” data-id=’//apple_ref/doc/c_ref/__kindof’__kindof /a UIView *)viewWithTag:(NSInteger)tag
Parameters
tag |
The tag value to search for. |
Return Value
The view in the receiver’s hierarchy whose tag property matches the value in the tag parameter.
Discussion
This method searches the current view and all of its subviews for the specified view.
tag
Property
An integer that you can use to identify view objects in your application.
Declaration
SWIFT
varInt
OBJECTIVE-C
@property(nonatomic) NSInteger tag
Discussion
The default value is 0. You can set the value of this tag and use that value to identify the view later.
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: CentOS7/8 安装 5+ 以上的Linux kernel
CentOS以稳定著称,稳定在另外一方面就是保守。所以CentOS7还在用3.10,CentOS8也才是4.18。而当前最新的Linux Kernel都更新到6.0 rc3了。其他较新的发行版都用上了5.10+的版本。本文简单介绍如何在CentOS7、8上直接…