The temperature remains constant during the melting of ice because the heat supplied to the ice is used for changing the solid ice to liquid. The latent heat absorbed by the solid ice is used for breaking the inter-molecular force rather than increasing the temperature of ice.