migueldeicaza/MonoTouch.Dialog — pull request #178 by maksimenko (2013-04-04 19:58:44+00:00)
Title: EntryElement UITextField position miscalculated

When testing an app that uses an EntryElement on an Ad-Hoc configuration (couldn't reproduce it in Debug), after a while (usually the 2nd or 3rd time loading a dialog) the static UIFont that is used to calculate the EntryAligment returns a font of size 0. So it messes up all the calculations for the ComputeEntryPosition method.

Using a local UIFont var fixes the problem.

I think this could be a problem of the mono compiler, but at least this patch fixes the issue for MT.D.

Hope it helps!

PS. system info below
====
Xamarin Studio
Version 4.0.3 (build 13)
Installation UUID: 675af92b-4382-4a2c-aeb5-2718b3d00757
Runtime:
Mono 3.0.7 (master/514fcd7)
GTK 2.24.16
GTK# (2.12.0.0)
Package version: 300070000

Apple Developer Tools
Xcode 4.6.1 (2067)
Build 4H512

Xamarin.iOS
Version: 6.3.2.0 (Indie Edition)
Hash: 56e611b
Branch:
Build date: 2013-25-03 21:37:44-0400
=====