
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
motion-imager is a RubyMotion DSL in top of JTSImageViewController by Jared Sinclair allowing you to easily create a "light-box" type view for users to view an image and interact with it.
gem 'motion-imager'
to your gemfilebundle
rake pod:install
Using a UIImage:
MotionImager.new({
image: UIImage.imageNamed('something'),
presenting_from: WeakRef.new(self),
}).show
Using a URL:
MotionImager.new({
# OR an instance of NSURL
url: 'https://www.google.com/images/srpr/logo11w.png',
placeholder: 'my_placeholder_image',
presenting_from: WeakRef.new(self),
}).show
Showing a lightbox with text. This view is only text, no image.
MotionImager.new({
presenting_from: WeakRef.new(self),
transition: :original,
mode: :alt_text,
text: "This is a cool image",
}).show
Manually dismiss the lightbox:
mi = MotionImager.new({
image: UIImage.imageNamed('something'),
presenting_from: WeakRef.new(self),
})
mi.show
# some time later:
mi.dismiss # mi.hide will work too!
Access the lightbox controller:
mi = MotionImager.new({
image: UIImage.imageNamed('something'),
presenting_from: WeakRef.new(self),
})
# add subviews to controller view for customization!
mi.controller
Documentation for all available options:
{
# A local image reference.
# Can also be a String that will be turned into a UIImage
# REQUIRED id not specifying `url`
image: UIImage.imageNamed('something'),
# A url can be any displayable image on iOS.
# Can also be an instance of NSURL
# REQUIRED if not specifying `image`
url: 'https://www.google.com/images/srpr/logo11w.png',
# Placeholder image that will be displayed during the image download time.
# Can also be an instance of UIImage
# OPTIONAL
placeholder: 'my_placeholder.png',
# What view controller to show the lightbox from.
# REQUIRED. Should almost ALWAYS be `WeakRef.new(self)`
presenting_from: WeakRef.new(self),
# Two image transitions are supported:
# :original - displays the image zooming from it's original position on the screen
# :off_screen - slides the image in from off screen.
# OPTIONAL. Defaults to `:original`
transition: :original,
# Two modes are supported:
# :image - only dislays the image
# :alt_text - displays text instead of an image. Requires `text` to be set
# OPTIONAL. Defaults to `:image`
mode: :image,
# Sets the text for the image when using mode: :alt_text.
# OPTIONAL
text: "Some Text",
# Sets the animation and style of the background while in lightbox mode
# Options supported are:
# none:, scaled:, blurred:, scaled_blurred:
# OPTIONAL. Defaults to :scaled
background: :scaled_blurred,
# The frame of the originating view on the screen.
# If set and in :original transition, the full-screen image
# will zoom from this location on the screen.
# OPTIONAL
rect: my_thumbnail.frame,
# The the superview of the rect you set above.
# OPTIONAL
view: view
}
MotionImager.url({})
, MotionImager.image({})
, and MotionImager.text({})
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that motion-imager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.