示例#1
0
        /// <param name = "owner">The object which owns the outlet. Usually <c>this</c>.</param>
        /// <param name = "name">The name of the outlet. Usually the name set within Interface Builder.</param>
        public IBOutlet(NSObject owner, string name)
        {
            Contract.Requires(!NSObject.IsNullOrNil(owner), "owner is null or nil");
            Contract.Requires(!string.IsNullOrEmpty(name), "name is null or empty");

            m_owner = owner;
            m_name  = name;
        }
示例#2
0
        public bool isMemberOfClass(NSObject klass)
        {
            Contract.Requires(!NSObject.IsNullOrNil(klass), "klass is null or nil");
            Contract.Requires(!m_deallocated, "ref count is zero");

            if (m_instance != IntPtr.Zero)
            {
                return((sbyte)Call("isMemberOfClass:", klass) != 0);
            }
            else
            {
                return(false);
            }
        }