我有幾個控件(UIView的子類)放在UIScrollView上。現在我想從UISrollView中移除它們並創建新的控件。下面的代碼運行,但沒有效果! 我在做什麼錯?從XAMARIN的UIScrollView中刪除UIView
for (int i = 0; i < myScroll.Subviews.Length; i++) {
Console.WriteLine (myScroll.Subviews [i].GetType());
myScroll.Subviews [i].Dispose();
myScroll.Subviews [i] = null;
}