Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntryElement UITextField position miscalculated #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maksimenko
Copy link

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

It fixes random entry alignment issues that were caused by the static font var that returned a 0 sized font, causing the sizing calculation to mess up
@spouliot
Copy link
Collaborator

spouliot commented Apr 6, 2013

Is that something that can be reproduced with the MT.D sample app ?

Also does this happens on the simulator, devices (I assume so, since it's Ad-Hoc) or both ?

By default there's not much differences between Debug and Ad-Hoc builds, i.e. nothing to explain this. Except that your project options could differ between them, e.g. using Boehm, sgen, sgen + newrefcount

Could you file a bug report and attach the full bug logs, for both builds ? Add -v -v -v to the additional mtouch arguments (in the project options) so we'll get more details (and possibly clue) about what could differ. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants