我正在创建一个自定义弹出窗口,其中包含一个 UIImageView,我在其中添加了一些元素。 问题是,当我添加 UITableView 时,它不可滚动(实际上它似乎也不可点击 - 未调用 RowSelected 事件)。
customPopup = new UIImageView (new RectangleF (16, 50, 283, 499));
customPopup.Image = UIImage.FromFile ("Images/popup.png");
customPopupTableView = new UITableView (new RectangleF (0,200, 283, 220));
customPopupListSource = new CustomPopupListSource();
customPopupTableView.BackgroundColor = UIColor.Clear;
customPopupTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
customPopupTableView.RowHeight = 100;
customPopupTableView.Source = customPopupListSource;
customPopup.Add (customPopupTableView);
知道什么会导致这种行为吗?
最佳答案
如果有人遇到这个问题,解决它的方法是添加:
customPopup.UserInteractionEnabled = true;
关于ios - UIImageView 上的 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26414874/