, ▁through ▁the ▁introduction ▁of ▁protocol s . ▁This ▁is ▁a ▁pattern ▁achiev able ▁either ▁as ▁an ▁abstract ▁multiple ▁inherited ▁base ▁class ▁in ▁C ++, ▁or ▁as ▁an ▁" interface " ▁( as ▁in ▁Java ▁and ▁C # ). ▁Object ive - C ▁makes ▁use ▁of ▁ad ▁h oc ▁protocol s ▁called ▁inform al ▁protocol s ▁and ▁compiler - en for ced ▁protocol s ▁called ▁formal ▁protocol s . ▁ ▁An ▁inform al ▁protocol ▁is ▁a ▁list ▁of ▁methods ▁that ▁a ▁class ▁can ▁opt ▁to ▁implement . ▁It ▁is ▁specified ▁in ▁the ▁documentation , ▁since ▁it ▁has ▁no ▁presence ▁in ▁the ▁language . ▁Inform al ▁protocol s ▁are ▁implemented ▁as ▁a ▁category ▁( see ▁below ) ▁on ▁NS Object ▁and ▁often ▁include ▁optional ▁methods , ▁which , ▁if ▁implemented , ▁can ▁change ▁the ▁behavior ▁of ▁a ▁class . ▁For ▁example , ▁a ▁text ▁field ▁class ▁might ▁have ▁a ▁delegate ▁that ▁implements ▁an ▁inform al ▁protocol ▁with ▁an ▁optional ▁method ▁for ▁performing ▁auto - comple tion ▁of ▁user - ty ped ▁text . ▁The ▁text ▁field ▁disco vers ▁whether ▁the ▁delegate ▁implements ▁that ▁method ▁( via ▁reflection ) ▁and , ▁if ▁so , ▁calls ▁the ▁delegate ' s ▁method ▁to ▁support ▁the ▁auto - complete ▁feature . ▁ ▁A ▁formal ▁protocol ▁is ▁similar ▁to ▁an ▁interface ▁in ▁Java , ▁C #, ▁and ▁Ada ▁ 2 0 0 5 . ▁It ▁is ▁a ▁list ▁of ▁methods ▁that ▁any ▁class ▁can ▁declare ▁itself ▁to ▁implement . ▁Vers ions ▁of ▁Object ive - C ▁before ▁ 2