public void RemoveObjectForKey(string key) { IntPtr handle = ObjC.ToNSString(key); ObjC.MessageSendIntPtr(Handle, "removeObjectForKey:", handle); ObjC.MessageSend(handle, "release"); }
public void SetObjectForKey(NSObject obj, string key) { IntPtr handle = ObjC.ToNSString(key); ObjC.MessageSendIntPtr(Handle, "setObject:forKey:", obj.Handle, handle); ObjC.MessageSend(handle, "release"); }
public NSObject ObjectForKey(string key) { IntPtr handle = ObjC.ToNSString(key); var value = Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, "objectForKey:", handle)); ObjC.MessageSend(handle, "release"); return(value); }
public static NSDictionary FromObjectAndKey(NSObject obj, string key) { IntPtr handle = ObjC.ToNSString(key); var dictionary = Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, "dictionaryWithObject:forKey:", obj.Handle, handle)); ObjC.MessageSend(handle, "release"); return(dictionary); }
public UIActivityViewController(string text, UIImage image) { IntPtr textHandle = ObjC.ToNSString(text); IntPtr array = ObjC.ToNSArray(new[] { textHandle, image.Handle }); ObjC.MessageSendIntPtr(Handle, "initWithActivityItems:applicationActivities:", array, IntPtr.Zero); ObjC.MessageSend(textHandle, "release"); }