An imaging device that can shorten focus searching search times and enable
correct focusing in accordance with shooting conditions. An autofocus
function operates when a shutter button of a digital camera is
half-pressed. At this time, a current shooting mode, which was selected
in advance by a photographer operating a variety of buttons, is acquired.
In accordance with the acquired shooting mode, a focusing lens moves to a
search start position. Also, a direction in which the focusing lens will
move is decided in accordance with the shooting mode. The focusing lens
is moved and an in-focus position is thereby found. Then the focusing
lens is adjusted to the in-focus position.