A digital camera includes a phase difference AF sensor unit, phase
difference AF detection unit, contrast AF detection unit, lens driving
unit which focuses a taking lens, shading determination unit which
determines based on lens information of the taking lens whether focus
detection by the phase difference AF sensor unit is possible, and an AF
control unit. The AF control unit cause the lens driving unit to focus
the taking lens based on a focus detection result of the phase difference
AF detection unit when the shading determination unit determines that the
focus detection by the phase difference AF sensor unit is possible, and
causes the lens driving unit to focus the taking lens based on a focus
detection result of the contrast AF detection unit when the shading
determination unit determines that the focus detection by the phase
difference AF sensor unit is not possible.