An intraocular implant is provided. The intraocular implant comprises a matrix material, and a composition comprising a masking compound and a prepolymer. The masking compound is capable of blocking polymerization or crosslinking of the prepolymer, until photoisomerization of the compound is triggered, and the compound is converted from a first isomer to a second isomer having a different absorption profile. The prepolymer is a composition that can undergo a polymerization or crosslinking reaction upon photoinitiation