Saved Bookmarks
| 1. |
What Is A Category And When Is It Used? |
|
Answer» A category is a way of ADDING ADDITIONAL methods to a CLASS without extending it. It is often used to add a COLLECTION of related methods. A common use case is to add additional methods to built in classes in the Cocoa frameworks. For example adding async download methods to the UIImage class. A category is a way of adding additional methods to a class without extending it. It is often used to add a collection of related methods. A common use case is to add additional methods to built in classes in the Cocoa frameworks. For example adding async download methods to the UIImage class. |
|