【发布时间】:2020-12-05 05:57:39
【问题描述】:
我有一些代码,其中有 3 个按钮,我想在单击时找出这些按钮的父视图
@IBAction func resizeButtonClicked(sender: UIButton) {
if(sender.isEqual(resizeButton)) {
//This is to convert to small square
} else if(sender.isEqual(maximizeButton)) {
//This is to convert to maximized view
} else if(sender.isEqual(closeButton)) {
//This is to close the view completely
}
}
现在我可以识别发件人按钮,但如何识别此按钮所在的视图?
谢谢
尼基尔
【问题讨论】: