The sensing and detection of metal ions are significant to environmental protection,and sensor's reversibility is the premise for utility.Spiropyran(SP) and merocyanine(MC) is a pair of optical isomer,for which the optical switching behavior can endow sensor with reversibility as SP exposed to ultraviolet(UV) light switches to MC form which can reversibly combine with metal ions.The recent progresses are reviewed,and analysis about the merits and demerits of SP and derivative in terms of reversibility,sensitivity and selectivity are involved.