Created
December 15, 2011 20:24
-
-
Save tmiz/1482708 to your computer and use it in GitHub Desktop.
KVOTest.cs 005 Last
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
using System; | |
using System.Threading; | |
using MonoMac.Foundation; | |
namespace KVOTestClock | |
{ | |
[Register("KVOTest")] | |
public class KVOTest : NSObject | |
{ | |
public KVOTest () | |
{ | |
new Timer((state => { | |
using(NSAutoreleasePool pool = new NSAutoreleasePool()) { | |
DateTime dt = DateTime.Now; | |
SetValueForKey((NSString)dt.ToString(), (NSString)"title"); | |
} | |
} ) , null, 0, 1000); | |
} | |
[Export("title")] | |
NSString Title { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment