January 2015 Blog Posts

Sizing a custom iOS View to fit its children

Just spent a few hours wondering why my custom UIView I have created in Xamarin iOS was seemingly ignoring my request to set the BackgroundColor. There are many many theories on the web but one finally told me to check the Size of the View’s Frame. I had assumed there was not a problem with the View’s height because the UILabels that were SubViews were displaying as I expected It turns out that the even though the child controls were sizing correctly the containing control had zero 0 height. How very HTML\CSS of it. This stackoverflow...