Exemplo n.º 1
0
 public UIAlertView()
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "init");
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }
Exemplo n.º 2
0
 public UIActionSheet()
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "init");
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }
Exemplo n.º 3
0
 public void ShowInView(UIView view)
 {
     ObjC.MessageSendIntPtr(Handle, "showInView:", view.Handle);
 }
Exemplo n.º 4
0
        public static IntPtr ToNSSet(IntPtr[] items)
        {
            IntPtr array = ToNSArray(items);

            return(ObjC.MessageSendIntPtr(GetClass("NSSet"), "setWithArray:", array));
        }
Exemplo n.º 5
0
 public static IntPtr ToNSDate(DateTime date)
 {
     return(ObjC.MessageSendIntPtr(GetClass("NSDate"), "dateWithTimeIntervalSinceReferenceDate:", (double)((date.Ticks - 631139040000000000) / 10000000)));
 }
Exemplo n.º 6
0
 public static NSDictionary FromFile(string path)
 {
     return(Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, "dictionaryWithContentsOfFile:", path)));
 }
Exemplo n.º 7
0
        public string[] KeysForObject(NSObject obj)
        {
            var array = Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, "allKeysForObject:", obj.Handle));

            return(ObjC.FromNSArray(array.Handle));
        }
Exemplo n.º 8
0
 public static NSData FromBytes(IntPtr bytes, uint size)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, "dataWithBytes:length:", bytes, size)));
 }
Exemplo n.º 9
0
 public static NSData FromData(NSData source)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, "dataWithData:", source.Handle)));
 }
Exemplo n.º 10
0
 public UIPopoverController(UIViewController controller)
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "initWithContentViewController:", controller.Handle);
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }
Exemplo n.º 11
0
 public void SetPopoverContentSize(CGSize size, bool animated)
 {
     ObjC.MessageSendIntPtr(Handle, "setPopoverContentSize:animated:", size, animated);
 }
Exemplo n.º 12
0
 public static UIImage LoadFromData(NSData data, float scale)
 {
     return(Runtime.GetNSObject <UIImage>(ObjC.MessageSendIntPtr(_classHandle, "imageWithData:scale:", data.Handle, scale)));
 }
Exemplo n.º 13
0
 public static UIImage FromBundle(string name)
 {
     return(Runtime.GetNSObject <UIImage>(ObjC.MessageSendIntPtr(_classHandle, "imageNamed:", name)));
 }
Exemplo n.º 14
0
 public static SKPayment PaymentWithProduct(SKProduct product)
 {
     return(Runtime.GetNSObject <SKPayment>(ObjC.MessageSendIntPtr(_classHandle, "paymentWithProduct:", product.Handle)));
 }
Exemplo n.º 15
0
//        public double DaylightSavingTimeOffset(DateTime date)
//        {
//            return ObjC.MessageSendDouble(Handle, "daylightSavingTimeOffsetForDate:", date);
//        }

        public static NSTimeZone FromAbbreviation(string abbreviation)
        {
            return(Runtime.GetNSObject <NSTimeZone>(ObjC.MessageSendIntPtr(_classHandle, "timeZoneWithAbbreviation:", abbreviation)));
        }
Exemplo n.º 16
0
 public static NSData FromBytesNoCopy(IntPtr bytes, uint size, bool freeWhenDone)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, "dataWithBytesNoCopy:length:freeWhenDone:", bytes, size, freeWhenDone)));
 }
Exemplo n.º 17
0
 public static NSTimeZone FromName(string name)
 {
     return(Runtime.GetNSObject <NSTimeZone>(ObjC.MessageSendIntPtr(_classHandle, "timeZoneWithName:", name)));
 }
Exemplo n.º 18
0
 public double NumberFromString(string text)
 {
     return(ObjC.FromNSNumber(ObjC.MessageSendIntPtr(Handle, "numberFromString:", text)));
 }
Exemplo n.º 19
0
 public NSDictionary()
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "init");
 }
Exemplo n.º 20
0
 public UIUserNotificationSettings()
 {
     ObjC.MessageSendIntPtr(Handle, "init");
 }
Exemplo n.º 21
0
 public AdBannerView(AdType type)
 {
     ObjC.MessageSendIntPtr(Handle, "initWithAdType:", (int)type);
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }
Exemplo n.º 22
0
 public UILocalNotification()
 {
     ObjC.MessageSendIntPtr(Handle, "init");
 }
Exemplo n.º 23
0
 public static IntPtr ToNSUrl(string str)
 {
     //NOTE: NSURL is all caps
     return(ObjC.MessageSendIntPtr(GetClass("NSURL"), "URLWithString:", str));
 }
Exemplo n.º 24
0
        public UIActivityViewController(UIImage image)
        {
            IntPtr array = ObjC.ToNSArray(new[] { image.Handle });

            ObjC.MessageSendIntPtr(Handle, "initWithActivityItems:applicationActivities:", array, IntPtr.Zero);
        }
Exemplo n.º 25
0
        public static IntPtr ToNSNumber(double value)
        {
            IntPtr handle = ObjC.MessageSendIntPtr(GetClass("NSDecimalNumber"), "alloc");

            return(ObjC.MessageSendIntPtr(handle, "initWithDouble:", value));
        }
Exemplo n.º 26
0
 public NSTimeZone()
 {
     ObjC.MessageSendIntPtr(Handle, "init");
 }
Exemplo n.º 27
0
 public void DismissWithClickedButtonIndex(int buttonIndex, bool animated)
 {
     ObjC.MessageSendIntPtr(Handle, "dismissWithClickedButtonIndex:animated:", buttonIndex, animated);
 }
Exemplo n.º 28
0
 public NSTimeZone(string name)
 {
     Handle = ObjC.MessageSendIntPtr(Handle, "initWithName:", name);
 }
Exemplo n.º 29
0
 public NSObject()
 {
     Handle = ObjC.MessageSendIntPtr(ClassHandle, "alloc");
     Runtime.RegisterNSObject(this);
     _shouldRelease = true;
 }
Exemplo n.º 30
0
 public SKProductsRequest(params string[] productIds)
 {
     ObjC.MessageSendIntPtr(Handle, "initWithProductIdentifiers:", ObjC.ToNSSet(productIds));
     ObjC.MessageSend(Handle, "setDelegate:", Handle);
 }