A method of controlling a digital photographing apparatus, the method characterised by comprising: calculating a deviation of image data received from an image sensor for a predetermined time period, before determining whether a user is about to perform an auto-focus, AF, operation; determining whether the user of the digital photographing apparatus is about to perform the AF operation by recognizing a behaviour pattern of the user, wherein the determining of whether the AF operation is about to be performed comprises determining whether the AF operation is about to be performed by calculating the deviation of the image data comprising at least one of brightness, contrast, RGB data, colour temperature, and exposure in a designated region of the image sensor per unit time, comparing the calculated deviation with a reference value, and determining the deviation of the image data is equal to or less than the reference value for the predetermined period; performing a preceding operation of a focus lens if it is determined that the user is about to perform the AF operation, wherein the preceding operation is an operation for moving the focus lens to determine the moving direction of the focus lens during the AF operation; and performing a post operation of the focus lens when a first shutter-release button input to perform AF operation is received, wherein when the digital photographing apparatus is turned on and the AF operation is about to be performed, the preceding operation is a scanning operation to search for a location where the subject is focused around the infinite position by moving the focus lens a predetermined distance from an infinite focus location toward an opposite direction of the subject. calculating a deviation of image data received from an image sensor for a predetermined time period, before determining whether a user is about to perform an auto-focus, AF, operation; determining whether the user of the digital photographing apparatus is about to perform the AF operation by recognizing a behaviour pattern of the user, wherein the determining of whether the AF operation is about to be performed comprises determining whether the AF operation is about to be performed by calculating the deviation of the image data comprising at least one of brightness, contrast, RGB data, colour temperature, and exposure in a designated region of the image sensor per unit time, comparing the calculated deviation with a reference value, and determining the deviation of the image data is equal to or less than the reference value for the predetermined period; performing a preceding operation of a focus lens if it is determined that the user is about to perform the AF operation, wherein the preceding operation is an operation for moving the focus lens to determine the moving direction of the focus lens during the AF operation; and performing a post operation of the focus lens when a first shutter-release button input to perform AF operation is received, wherein when the digital photographing apparatus is turned on and the AF operation is about to be performed, the preceding operation is a scanning operation to search for a location where the subject is focused around the infinite position by moving the focus lens a predetermined distance from an infinite focus location toward an opposite direction of the subject.