简体   繁体   中英

xamarin.ios - adding views to tableitem programmatically

I'm building an interface in codes from scratch (there's nothing in XIB file). I'm adding a tableitem that consists of some cells and those cells contains one or more views (UIButton, UITextField, etc.)

The problem is none of the items are clickable/editable! When I click TextFields or Buttons, nothing happens! No highlighting, no cursor changing nothing at all...

What I'm missing here?

Also constructed the cells programmatically. I am adding controls directly to the UITableViewCell.

One possible issue: some of your views (may be ContentView or the UITableViewCell) hides the controls from manipulation. You should set that [UIView].userInteractionEnabled to false. You can also try to implement touch listeners to your views to recognize which one hides your controls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM