With a half press of a shutter button, a focus lens is moved from a near
distance end to a far distance end of a predetermined search range, and
AF evaluation values are calculated. Based on the AF evaluation values, a
maximum evaluation value and a first lens position corresponding to the
maximum evaluation value are detected. If the maximum evaluation value is
larger than a threshold value and the first lens position is not located
at the near distance end or the far distance end, the first lens position
becomes an in-focus position. If the first lens position is, for example,
at the near distance end, the focus lens is moved within an extended
search range set on the near distance side, and the maximum evaluation
value is obtained. A second lens position corresponding to the maximum
evaluation value becomes the in-focus position.