コード例 #1
0
ファイル: NSTimeZone.cs プロジェクト: aws/aws-sdk-unity-net
 public static NSTimeZone FromName(string name)
 {
     return(Runtime.GetNSObject <NSTimeZone>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("timeZoneWithName:"), name)));
 }
コード例 #2
0
ファイル: NSBundle.cs プロジェクト: Bectinced-aeN/vrcsdk
 public static NSBundle FromIdentifier(string str)
 {
     return(Runtime.GetNSObject <NSBundle>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("bundleWithIdentifier:"), str)));
 }
コード例 #3
0
 public UIUserNotificationSettings()
 {
     ObjC.MessageSendIntPtr(Handle, Selector.Init);
 }
コード例 #4
0
ファイル: NSDictionary.cs プロジェクト: aws/aws-sdk-unity-net
 public static NSDictionary FromFile(string path)
 {
     return(Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithContentsOfFile:"), path)));
 }
コード例 #5
0
ファイル: NSDictionary.cs プロジェクト: aws/aws-sdk-unity-net
        public string[] KeysForObject(NSObject obj)
        {
            var array = Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("allKeysForObject:"), obj.Handle));

            return(ObjC.FromNSArray(array.Handle));
        }
コード例 #6
0
 private string ObjectForKey(string key)
 {
     return(ObjC.FromNSString(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("objectForKey:"), ObjC.ToNSString(key))));
 }
コード例 #7
0
 public static SKPayment PaymentWithProduct(SKProduct product)
 {
     return(Runtime.GetNSObject <SKPayment>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("paymentWithProduct:"), product.Handle)));
 }
コード例 #8
0
ファイル: NSData.cs プロジェクト: aws/aws-sdk-unity-net
 public static NSData FromBytesNoCopy(IntPtr bytes, uint size, bool freeWhenDone)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dataWithBytesNoCopy:length:freeWhenDone:"), bytes, size, freeWhenDone)));
 }
コード例 #9
0
ファイル: NSObject.cs プロジェクト: aws/aws-sdk-unity-net
 public NSObject()
 {
     Handle = ObjC.MessageSendIntPtr(ClassHandle, Selector.AllocHandle);
     Runtime.RegisterNSObject(this);
     _shouldRelease = true;
 }
コード例 #10
0
ファイル: NSData.cs プロジェクト: aws/aws-sdk-unity-net
 public static NSData FromBytes(IntPtr bytes, uint size)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dataWithBytes:length:"), bytes, size)));
 }
コード例 #11
0
ファイル: NSData.cs プロジェクト: aws/aws-sdk-unity-net
 public static NSData FromData(NSData source)
 {
     return(Runtime.GetNSObject <NSData>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dataWithData:"), source.Handle)));
 }
コード例 #12
0
 public AdBannerView(AdType type)
 {
     ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithAdType:"), (int)type);
     ObjC.MessageSend(Handle, Selector.GetHandle("setDelegate:"), Handle);
 }
コード例 #13
0
ファイル: UIImage.cs プロジェクト: aws/aws-sdk-unity-net
 public static UIImage LoadFromData(NSData data, float scale)
 {
     return(Runtime.GetNSObject <UIImage>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("imageWithData:scale:"), data.Handle, scale)));
 }
コード例 #14
0
ファイル: UIImage.cs プロジェクト: aws/aws-sdk-unity-net
 public static UIImage FromBundle(string name)
 {
     return(Runtime.GetNSObject <UIImage>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("imageNamed:"), name)));
 }
コード例 #15
0
 public UIPopoverController(UIViewController controller)
 {
     Handle = ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithContentViewController:"), controller.Handle);
     ObjC.MessageSend(Handle, Selector.GetHandle("setDelegate:"), Handle);
 }
コード例 #16
0
        public static IntPtr ToNSSet(IntPtr[] items)
        {
            IntPtr array = ToNSArray(items);

            return(ObjC.MessageSendIntPtr(GetClass("NSSet"), SetWithArraySelector.Handle, array));
        }
コード例 #17
0
 public void SetPopoverContentSize(CGSize size, bool animated)
 {
     ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("setPopoverContentSize:animated:"), size, animated);
 }
コード例 #18
0
 public static IntPtr ToNSUrl(string str)
 {
     //NOTE: NSURL is all caps
     return(ObjC.MessageSendIntPtr(GetClass("NSURL"), URLWithStringSelector.Handle, str));
 }
コード例 #19
0
 public SKProductsRequest(params string[] productIds)
 {
     ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithProductIdentifiers:"), ObjC.ToNSSet(productIds));
     ObjC.MessageSend(Handle, Selector.GetHandle("setDelegate:"), Handle);
 }
コード例 #20
0
 public static IntPtr ToNSDate(DateTime date)
 {
     return(ObjC.MessageSendIntPtr(GetClass("NSDate"), DateWithTimeIntervalSinceReferenceDateSelector.Handle, (double)((date.Ticks - 631139040000000000) / 10000000)));
 }
コード例 #21
0
 public UILocalNotification()
 {
     ObjC.MessageSendIntPtr(Handle, Selector.Init);
 }
コード例 #22
0
        public static IntPtr ToNSNumber(double value)
        {
            IntPtr handle = ObjC.MessageSendIntPtr(GetClass("NSDecimalNumber"), Selector.AllocHandle);

            return(ObjC.MessageSendIntPtr(handle, InitWithDoubleSelector.Handle, value));
        }
コード例 #23
0
ファイル: NSDictionary.cs プロジェクト: aws/aws-sdk-unity-net
 public NSDictionary()
 {
     Handle = ObjC.MessageSendIntPtr(Handle, Selector.Init);
 }
コード例 #24
0
ファイル: UIView.cs プロジェクト: aws/aws-sdk-unity-net
 public UIView()
 {
     ObjC.MessageSendIntPtr(Handle, Selector.Init);
 }
コード例 #25
0
        public UIActivityViewController(UIImage image)
        {
            IntPtr array = ObjC.ToNSArray(new[] { image.Handle });

            ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("initWithActivityItems:applicationActivities:"), array, IntPtr.Zero);
        }
コード例 #26
0
ファイル: UIView.cs プロジェクト: aws/aws-sdk-unity-net
 public UIView(CGRect frame)
 {
     Handle = ObjC.MessageSendIntPtr(Handle, Selector.InitWithFrame, frame);
 }
コード例 #27
0
ファイル: NSBundle.cs プロジェクト: Bectinced-aeN/vrcsdk
 public static NSBundle FromPath(string path)
 {
     return(Runtime.GetNSObject <NSBundle>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("bundleWithPath:"), path)));
 }
コード例 #28
0
ファイル: UIAlertView.cs プロジェクト: Bectinced-aeN/vrcsdk
 public UIAlertView()
 {
     Handle = ObjC.MessageSendIntPtr(Handle, Selector.Init);
     ObjC.MessageSend(Handle, Selector.GetHandle("setDelegate:"), Handle);
 }
コード例 #29
0
 public double NumberFromString(string text)
 {
     return(ObjC.FromNSNumber(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("numberFromString:"), text)));
 }
コード例 #30
0
ファイル: NSTimeZone.cs プロジェクト: aws/aws-sdk-unity-net
//        public double DaylightSavingTimeOffset(DateTime date)
//        {
//            return ObjC.MessageSendDouble(Handle, "daylightSavingTimeOffsetForDate:", date);
//        }

        public static NSTimeZone FromAbbreviation(string abbreviation)
        {
            return(Runtime.GetNSObject <NSTimeZone>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("timeZoneWithAbbreviation:"), abbreviation)));
        }