MojoDK
MojoDK

Reputation: 4538

Getting width of Monotouch.Dialog UIViewElement?

I'm trying to make an UIView (for a UIViewElement), but how do I get the bounds (at least width) of this UIViewElement?

Thanks Mojo

Upvotes: 5

Views: 563

Answers (1)

Anuj
Anuj

Reputation: 3134

UIViewElement just takes the view that you pass into the constructor and adds it to the ContentView of the UITableViewCell.

Since cells are dynamic and not all of them are the same size...

I would recommend you create a UIViewElement subclass with a ContentViewBounds property and set that value inside the GetCell method for your custom element.

Upvotes: 3

Related Questions