Category: You rarely utilize a classification to add strategies to a current class, for example, one characterized in the Cocoa systems. The consolidated procedures are acquired by subclasses and are vague at runtime from the first techniques for the class. You can likewise utilize classifications of your own classes to Distribute the usage of your private classes into independent source files — for example; you could assemble the techniques for an expansive class into a few classes and put every class in an alternate record. Announce private procedures.

Extension - Extensions add new usefulness to a current class, structure, count, or convention type. This incorporates the capacity to broaden types for which you do not approach the original source code (known as retroactive demonstrating). Expansions are like classifications in Objective-C. (Unlike Objective-C types, Swift extensions do not have names.)

Suggest An Answer

No suggestions avaliable!