簡體   English   中英

UIImageView上的UITableView

[英]UITableView on UIImageView

我正在創建一個自定義彈出窗口,其中包含一個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;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM