▁method ▁of ▁the ▁ ▁class ▁is ▁used ▁to ▁do ▁forward ing . ▁ ▁Example ▁Here ▁is ▁an ▁example ▁of ▁a ▁program ▁that ▁demonstr ates ▁the ▁bas ics ▁of ▁forward ing . ▁▁ ▁For ward er . h ▁# import ▁< obj c / Object . h > ▁ ▁@ interface ▁For ward er ▁: ▁Object ▁{ ▁▁▁▁ ▁id ▁recip ient ; ▁// The ▁object ▁we ▁want ▁to ▁forward ▁the ▁message ▁to . ▁} ▁ ▁// Accessor ▁methods . ▁- ▁( id ) reci p ient ; ▁- ▁( id ) set Re cip ient :( id )_ reci p ient ; ▁@ end ▁▁ ▁For ward er . m ▁# ▁import ▁" For ward er . h " ▁ ▁@ implementation ▁For ward er ▁ ▁- ▁( ret val _ t ) forward :( SE L ) sel ▁args :( arg list _ t ) ▁args ▁{ ▁ ▁/* ▁ ▁* ▁Check ▁whether ▁the ▁recip ient ▁actually ▁respond s ▁to ▁the ▁message . ▁ ▁* ▁This ▁may ▁or ▁may ▁not ▁be ▁des irable , ▁for ▁example , ▁if ▁a ▁recip ient ▁ ▁* ▁in ▁turn ▁does ▁not ▁respond ▁to ▁the ▁message , ▁it ▁might ▁do ▁forward ing ▁ ▁* ▁itself . ▁ ▁*/ ▁ ▁if ▁([ reci p ient ▁respond s To Selector : sel ]) ▁{ ▁▁ ▁return ▁[ reci p ient ▁perform v : sel ▁args : args ]; ▁ ▁} ▁else ▁{ ▁▁ ▁return ▁[ self ▁error :" Re cip ient ▁does ▁not ▁respond "]; ▁ ▁} ▁} ▁ ▁-