Interpenetration of CH3NH3PbI3 and TiO2 improves perovskite solar cells while TiO2 expansion leads to degradation.