Source from Project QuickDialog(https://github.com/escoz/QuickDialog)