Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
github.com/antondomashnev/adpuzzleanimation
Custom animation for UIView inspired by Fabric - Answers animation.
To create your first animation you need to know only about one method:
/**
Designated initializer for puzzle animation and it's subclasses
- parameter viewToAnimate: view to render into pieces
- parameter configuration: animation configuration
- returns: newly created animation instance
*/
init(viewToAnimate: UIView, configuration: PuzzleAnimationConfiguration = PuzzleAnimationConfiguration())
It's flixible - you can configure almost any parameter for the animation:
/**
* Defines the structure that contains configurable parameters for puzzle animation
*/
struct PuzzleAnimationConfiguration {
/// Defines the animation velocity. Higher velocity less animation duration
var animationVelocity: NSTimeInterval = 1
/// Defines the delay between each piece in piece's group animation
var pieceAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceAnimationDelay
/// Defines the delay between each group of pieces animation
var pieceGroupAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceGroupAnimationDelay
/// Defines the animation piece's scale
var animationScale: Double = 2.5
/// Each piece represents square and this value represents the number of pixels of square side
var pieceSide: CGFloat = 40
}
Handle callbacks about status to start new animation or do something else:
/// Called when animation completed, stoped or failed
/// @note You can set it any time even during the animation
public var animationCompletion: PuzzleAnimationCompletion?
Intuitive and simple interface:
/**
Starts the animation. Makes view to animate hidden
*/
public func start()
/**
Stops the animation. Removes all pieces from superview. Makes view to animate visible
*/
public func stop()
For the complete example check the viewController.swift
To integrate ADPuzzleAnimation into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'PuzzleAnimation', '~> 1.1.1'
To integrate ADPuzzleAnimation into your Xcode project using Carthage, specify it in your Cartfile
:
github "Antondomashnev/ADPuzzleAnimation" ~> 1.1.1
Run carthage update
to build the framework and drag the built ADPuzzleAnimation.framework
into your Xcode project.
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.