如何在UItextField
中获取当前显示的PageControl
的实例,因为我正在UItextField
分配UItextField
PageControl
的实例' Add reference to Microsoft Internet Controls (SHDocVw)
' Add reference to Microsoft HTML Object Library
Dim anchors As IHTMLElementCollection
Dim anchor As HTMLAnchorElement
Set anchors = htmlDoc.getElementsByTagName("a")
For Each anchor In anchors
' anchor.Click ... this probably won't work
' I gues something like this is what you want (untested code)
ie.navigate anchor.href, 1 ' BrowserNavConstants.navOpenInNewTab
Next anchor
1}}
答案 0 :(得分:0)
您需要使用类型转换。这段代码会这样做: 首先,您需要设置UITextField的tag属性,如
yourTextField.tag = 123
现在您可以使用像
这样的标记属性来获取yourTextFieldif let theTextField = self.view.viewWithTag(123) as? UITextField {
theLabel.text = "some text"
}