We report here the use of anion recognition to control the folding and unfolding of a single polymeric chain consisting of a PMMA bearing pendant calix[4]pyrrole and Pt(ii) porphyrin subunits.