1. A method of controlling an electronic device with a touch-sensitive display, comprising: detecting contact with the touch-sensitive display while the device is in a user-interface lock state; moving an image corresponding to a user-interface unlock state of the device in accordance with the contact; transitioning the device to the user-interface unlock state if the detected contact corresponds to a predefined gesture; and maintaining the device in the user-interface lock state if the detected contact does not correspond to the predefined gesture.