public static IntPtr ToNSArray(IntPtr[] items) { IntPtr intPtr = Marshal.AllocHGlobal((IntPtr)(items.Length * IntPtr.Size)); for (int i = 0; i < items.Length; i++) { Marshal.WriteIntPtr(intPtr, i * IntPtr.Size, items[i]); } IntPtr array = ObjC.MessageSendIntPtr(ObjC.GetClass("NSArray"), ArrayWithObjects_CountSelector.Handle, intPtr, items.Length); Marshal.FreeHGlobal(intPtr); return(array); }
static NSError() { _classHandle = ObjC.GetClass("NSError"); }
static NSTimeZone() { _classHandle = ObjC.GetClass("NSTimeZone"); }
static UIImageDispatcher() { _classHandle = ObjC.AllocateClassPair(ObjC.GetClass("NSObject"), "__UIImageDispatcher", 0); }
static UIUserNotificationSettings() { _classHandle = ObjC.GetClass("UIUserNotificationSettings"); }
static UIApplication() { _classHandle = ObjC.GetClass("UIApplication"); }
static NSDictionary() { _classHandle = ObjC.GetClass("NSDictionary"); }
static SKProductsResponse() { _classHandle = ObjC.GetClass("SKProductsResponse"); }
static UIScreenMode() { _classHandle = ObjC.GetClass("UIScreenMode"); }
static AdBannerView() { _classHandle = ObjC.GetClass("ADBannerView"); }
static SKPaymentQueue() { _classHandle = ObjC.GetClass("SKPaymentQueue"); }
static SKProduct() { _classHandle = ObjC.GetClass("SKProduct"); }
static UIDevice() { _majorVersion = -1; _minorVersion = -1; _classHandle = ObjC.GetClass("UIDevice"); }
static UIActionSheet() { _classHandle = ObjC.GetClass("UIActionSheet"); }
static NSNotification() { _classHandle = ObjC.GetClass("NSNotification"); }
static SKPayment() { _classHandle = ObjC.GetClass("SKPayment"); }
static UILocalNotification() { _classHandle = ObjC.GetClass("UILocalNotification"); }
static NSData() { _classHandle = ObjC.GetClass("NSData"); }
static UIDevice() { _classHandle = ObjC.GetClass("UIDevice"); }
static NSObject() { _classHandle = ObjC.GetClass("NSObject"); }
static UIScreen() { _classHandle = ObjC.GetClass("UIScreen"); }
static UIWindow() { _classHandle = ObjC.GetClass("UIWindow"); }
static NSBundle() { _classHandle = ObjC.GetClass("NSBundle"); }
static UIAlertView() { _classHandle = ObjC.GetClass("UIAlertView"); }
static NSNumberFormatter() { _classHandle = ObjC.GetClass("NSNumberFormatter"); }
static UIPopoverController() { _classHandle = ObjC.GetClass("UIPopoverController"); }
static UIImage() { _classHandle = ObjC.GetClass("UIImage"); }
static SKProductsRequest() { _classHandle = ObjC.GetClass("SKProductsRequest"); }
static UIActivityViewController() { _classHandle = ObjC.GetClass("UIActivityViewController"); }
static SKPaymentTransaction() { _classHandle = ObjC.GetClass("SKPaymentTransaction"); }