Migrate to the lib to Swift

- The popUp code is migrated to Swift