![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/king-wizard/uitextfield-shake-swift
UITextField extension in Swift that adds shake animation
Initially created by Andrea Mazzini (using Objective-C) on 08/02/14: https://github.com/andreamazz/UITextField-Shake
Translated by myself from Objective-C to Swift and provided to you on this repository.
##Setup with CocoaPods (recommended setup)
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
pod 'UITextField-Shake-Swift'
Then add import UITextField_Shake_Swift
at the top of your Swift class.
Finally compile and run and you will be good to go.
####Otherwise you can also manually import the framework
Just drag and drop UITextFieldShakeSwift/UITextFieldShakeSwift/UITextField+Shake.swift
file into your Xcode project and do not forget to check the checkbox entitled "Copy items if needed" and the appropriate checkboxe(s) in "Add to targets" section.
##Usage
###In Swift
// Shake
self.textField.shake()
// Shake with the default speed
self.textField.shake(10, // 10 times
withDelta: 5.0 // 5 points wide
)
// Shake with a custom speed
self.textField.shake(10, // 10 times
withDelta: 5.0, // 5 points wide
speed: 0.03 // 30ms per shake
)
// Shake with a custom speed and direction
self.textField.shake(10, // 10 times
withDelta: 5.0, // 5 points wide
speed: 0.03, // 30ms per shake
shakeDirection: ShakeDirection.Vertical
)
####Completion Handler You can also pass a closure that will be run as soon as the shake animation stops:
// Using the trailing closure syntax
self.textField.shake(10, withDelta: 5.0) {
() -> Void in
println("Called after TextField ended up shaking")
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.