Example #1
0
        public static NSSet MakeNSObjectSet <T> (T [] values) where T : NSObject
        {
            NSArray a = NSArray.FromNSObjects(values);

            return((NSSet)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(class_ptr, selSetWithArray, a.Handle)));
        }
Example #2
0
        public static bool LoadNibNamed(this NSBundle bundle, string nibName, NSObject owner, NSArray topLevelObjects)
        {
            bool   result;
            IntPtr name = NSString.CreateNative(nibName);

            result = Messaging.bool_objc_msgSend_IntPtr_IntPtr_IntPtr(bundle.Handle, Selector.GetHandle("loadNibNamed:owner:topLevelObjects:"), name, owner.Handle, topLevelObjects != null ? topLevelObjects.Handle : IntPtr.Zero);
            NSString.ReleaseNative(name);
            return(result);
        }
Example #3
0
 public NSSet(params string [] strings) : this(NSArray.FromStrings(strings))
 {
 }
Example #4
0
        public T [] ToArray <T> () where T : NSObject
        {
            IntPtr nsarr = _AllObjects();

            return(NSArray.ArrayFromHandle <T> (nsarr));
        }
Example #5
0
 public NSSet(params object [] objs) : this(NSArray.FromObjects(objs))
 {
 }
Example #6
0
        public static NSOrderedSet MakeNSOrderedSet <T> (T [] values) where T : NSObject
        {
            NSArray a = NSArray.FromNSObjects(values);

            return(Runtime.GetNSObject <NSOrderedSet> (MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(class_ptr, Selector.GetHandle(selSetWithArray), a.Handle)));
        }
Example #7
0
 public NSOrderedSet(params NSObject [] objs) : this(NSArray.FromNSObjects(objs))
 {
 }
Example #8
0
 public static string[] GetDirectories(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde = true)
 {
     return(NSArray.StringArrayFromHandle(NSSearchPathForDirectoriesInDomains(directory, domainMask, expandTilde)));
 }
Example #9
0
        public static string[] GetDirectories(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde)
        {
            IntPtr values = NSSearchPathForDirectoriesInDomains(directory, domainMask, expandTilde);

            return(NSArray.StringArrayFromHandle(values));
        }