Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在xamarin中开发一个ios应用程序。单击按钮时如何显示子视图(我使用xcode IB创建子视图)。然后当我单击同一个按钮时,必须再次显示子视图。如果按下按钮3次,必须显示 3 个子视图。
以一种非常常见的方式,它将是这样的:
yourButton.TouchUpInside += (object sender, EventArgs e) => { var newView = new UIView(); // do some stuff with your view here this.Add (newView); };