Created
September 26, 2013 15:37
-
-
Save Redth/6715940 to your computer and use it in GitHub Desktop.
The Length property is currently missing from the Xamarin.iOS API for IUILayoutSupport (TopLayoutGuide, BottomLayoutGuide). Here's a quick hack to fix it temporarily...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using MonoTouch.UIKit; | |
| using MonoTouch.ObjCRuntime; | |
| namespace Shield | |
| { | |
| public static class TopLayoutGuideExtensions | |
| { | |
| public static float Length(this IUILayoutSupport layoutSupport) | |
| { | |
| float length = 0f;// = 0; | |
| try | |
| { | |
| var selector = new Selector ("length"); | |
| length = MonoTouch.ObjCRuntime.Messaging.float_objc_msgSend (layoutSupport.Handle, selector.Handle); | |
| } | |
| catch { } | |
| return length; | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment