Created
May 4, 2015 14:07
-
-
Save chamons/284881e679cfc22a3827 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
public static class NSArrayControllerPatch | |
{ | |
static readonly IntPtr selSetFilterPredicate_Handle = ObjCRuntime.Selector.GetHandle ("setFilterPredicate:"); | |
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib", EntryPoint="objc_msgSend")] | |
public extern static void void_objc_msgSend_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1); | |
public static void SetFilterPredicate (this NSArrayController c, NSPredicate p) | |
{ | |
void_objc_msgSend_IntPtr (c.Handle, selSetFilterPredicate_Handle, p == null ? IntPtr.Zero : p.Handle); | |
} | |
} | |
insetad of PersonsArrayController.SetFilterPredicate (null); | |
PersonsArrayController.FilterPredicate = null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment