Method for providing user interface based on physical engine and an electronic device thereof

The purpose of the present invention is to provide a UI framework based on a physical engine in an electronic device. A method for operating an electronic device includes setting a virtual physical field to at least one region in a screen, mapping a UI object to be displayed in the at least one region to at least one virtual physical object in the physical field, assigning a physical attribute to the at least one virtual physical object, determining a state of the at least one virtual physical object on the basis of the physical field and the physical attribute of the UI object by using a physical engine, and displaying the UI object according to the state of the at least one virtual physical object.