method for ios