-
-
Save rolfbjarne/d7c3f3eb88c016dbe21d to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/TextKitDemo/TextKitDemo/InteractiveTextColoringViewController.cs b/TextKitDemo/TextKitDemo/InteractiveTextColoringViewController.cs | |
index d7f6dee..7b898ec 100644 | |
--- a/TextKitDemo/TextKitDemo/InteractiveTextColoringViewController.cs | |
+++ b/TextKitDemo/TextKitDemo/InteractiveTextColoringViewController.cs | |
@@ -8,6 +8,23 @@ using MonoTouch.CoreText; | |
namespace TextKitDemo | |
{ | |
+ [Register("UIPlaceholderTextView")] | |
+ public class UIPlaceholderTextView : UITextView | |
+ { | |
+ public string Placeholder { get; set; } | |
+ | |
+ public UIPlaceholderTextView() | |
+ { | |
+ } | |
+ | |
+ public UIPlaceholderTextView(IntPtr handle) : base(handle) | |
+ { | |
+ } | |
+ public UIPlaceholderTextView (RectangleF frame, NSTextContainer textContainer) : base (frame, textContainer) | |
+ { | |
+ } | |
+ } | |
+ | |
/* | |
* The view controller for the inteactive color sample. | |
*/ | |
@@ -35,7 +52,7 @@ namespace TextKitDemo | |
textStorage.AddLayoutManager (layoutManager); | |
- var newTextView = new UITextView (newTextViewRect, container); | |
+ var newTextView = new UIPlaceholderTextView (newTextViewRect, container); | |
newTextView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; | |
newTextView.ScrollEnabled = true; | |
newTextView.KeyboardDismissMode = UIScrollViewKeyboardDismissMode.OnDrag; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment