public UIActivityViewController(string text, UIImage image) { IntPtr textHandle = ObjC.ToNSString(text); IntPtr array = ObjC.ToNSArray(new[] { textHandle, image.Handle }); ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithActivityItems:applicationActivities:"), array, IntPtr.Zero); ObjC.MessageSend(textHandle, Selector.ReleaseHandle); }
public NSObject[] ObjectsForKeys(string[] keys) { IntPtr intPtr = ObjC.ToNSArray(keys); NSObject[] result = ObjC.FromNSArray <NSObject>(Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("objectsForKeys:notFoundMarker:"), intPtr, new NSObject().Handle)).Handle); ObjC.ReleaseNSArrayItems(intPtr); return(result); }
public UIActivityViewController(UIImage image) { IntPtr arg = ObjC.ToNSArray(new IntPtr[1] { image.Handle }); ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithActivityItems:applicationActivities:"), arg, IntPtr.Zero); }
public NSObject[] ObjectsForKeys(string[] keys) { var keysHandle = ObjC.ToNSArray(keys); var arrayPtr = Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("objectsForKeys:notFoundMarker:"), keysHandle, new NSObject().Handle)); var array = ObjC.FromNSArray <NSObject>(arrayPtr.Handle); ObjC.ReleaseNSArrayItems(keysHandle); return(array); }
public static NSDictionary FromObjectsAndKeys(NSObject[] objs, string[] keys) { var objectsHandle = ObjC.ToNSArray(objs); var keysHandle = ObjC.ToNSArray(keys); var dictionary = Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithObjects:forKeys:"), objectsHandle, keysHandle)); ObjC.ReleaseNSArrayItems(keysHandle); return(dictionary); }
public new static NSMutableDictionary FromObjectsAndKeys(NSObject[] objects, string[] keys) { IntPtr arg = ObjC.ToNSArray(objects); IntPtr intPtr = ObjC.ToNSArray(keys); NSMutableDictionary nSObject = Runtime.GetNSObject <NSMutableDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithObjects:forKeys:"), arg, intPtr)); ObjC.ReleaseNSArrayItems(intPtr); return(nSObject); }
public UIActivityViewController(string text) { IntPtr intPtr = ObjC.ToNSString(text); IntPtr arg = ObjC.ToNSArray(new IntPtr[1] { intPtr }); ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithActivityItems:applicationActivities:"), arg, IntPtr.Zero); ObjC.MessageSend(intPtr, Selector.ReleaseHandle); }