ios - UIImageView 上的 UITableView

标签 ios xamarin.ios xamarin

我正在创建一个自定义弹出窗口,其中包含一个 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/

相关文章:

android - Xamarin.Forms 预览器 - Android 应用程序项目必须引用包含此 xaml 文件的项目才能在预览器中呈现

ios - 尝试制作一个屏幕截图按钮,单击该按钮时将屏幕截图发送到我的相机胶卷。 swift 3、Xcode 8、IOS

ios - Xcode 中的小数位显示不正确?

c# - 如何在MugenMvvm中获取与 View 模型相关的 View

xamarin - 尝试在 Xamarin.iOS 中的 iOS 13 中运行时,应用程序在 UnregisterAllAsync 中严重崩溃

c# - "Expression not supported"调试 lambda 表达式时

iOS 8 今日扩展 : Is it possible to add editable text field?

ios - Xcode 4.2.1 ios 空项目中没有 MainWindow.xib

android - 通过 Xamarin 和 C# 使用和构建第 3 方控件

c# - System.TypeLoadException 当我尝试将 JArray 转换为线程中的对象时