Swift version of CardTilt