Patent attributes
A photographing method and an electronic device are provided, so that a to-be-photographed target can continue to be tracked after the to-be-photographed target returns to a shooting image, to improve accuracy of focusing performed during photographing of a moving object. The method includes: displaying a first image including a first object and a tracking indicator that is associated with the first object, the tracking indicator indicating that the first object is a tracked target; displaying a second image that does not include the first object or the tracking indicator; displaying a third image including the first object; automatically setting the first object as the tracked target and displaying the tracking indicator associated with the first object; and automatically focusing on the first object when displaying the third image.