Methods frequently used by nsobject objects in objective-C

Source: Internet
Author: User
/*
Used to determine whether the object is the type provided by the parameter (the parameter can be the class of the parent class)
Parameter example: [nsobject class];
  */
- (Bool) iskindofclass :( class) Aclass;

/* 
Used to determine whether the object is the type provided by the parameter (the parameter cannot be the class of the parent class)
Parameter example: [nsobject class];
 */
-(Bool) ismemberofclass :( class) Aclass;

/*
Determines whether an object is a subclass of a specified class.
 */
+(Bool) issubclassofclass :( class) Aclass;

/*
Used to determine whether an object complies with the protocol provided by Parameters
Parameter example: @ protocol (uiapplicationdelegate)
 */
-(Bool) conformstoprotocol :( Protocol*) Aprotocol;

/*
Method used to determine whether an object has Parameters
Parameter example: @ selector (test) or @ selector (testbyid :)
 */
-(Bool) respondstoselector :( SEL) aselector;

/*
Used to determine whether the caller's instance object has the provided Method
 */
+(Bool) instancesrespondtoselector :( SEL) aselector;

/*
The method provided by the delayed call parameter. The required parameters are passed in with withobject (similar to the setTimeout Function in actionscript3.0)
Delay unit: seconds
 */
-(Void) Performselector :( SEL) aselector withobject :(ID) Anargument afterdelay :( nstimeinterval) delay;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.