Skip to content

Instantly share code, notes, and snippets.

@tmiz
Created December 15, 2011 20:24
Show Gist options
  • Save tmiz/1482708 to your computer and use it in GitHub Desktop.
Save tmiz/1482708 to your computer and use it in GitHub Desktop.
KVOTest.cs 005 Last
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