Does anybody know how to add focus effect to UIImageView so background will be a little bit blurred. Below is an example image
Image Source: http://cdn-media-2.lifehack.org/wp-content/files/2011/09/focus1.jpg
You should UIBlurEffect.
var vEffect = UIVisualEffectView(effect: UIBlurEffect(style: .Light))
vEffect.frame = imageView.bounds
imageView.addSubview(visualEffectView)
Found this one in GitHub. "You can use blur effect and it's animation easily to call only two methods."
https://github.com/marty-suzuki/SABlurImageView
Hi i just developed one demo project using CLImageEditor in Objective-C. You can download my demo for your use from https://github.com/nitingohel/NGFocusView
RunTime output is:
Related
I want to use famo.us standard Scrollview but have a background image which is scrolling at a different speed to give a parallax effect.
Rather than setting up timers and getPosition stuff, i was wondering if there's a way to hook into an event stream, or somehow pipe the Scrollviews position into a transformation that's applied to another object? For example use the modifier within the scrollview and a modifier chain and then apply that to another imageSurface?
The examples are a bit thin here so would appreciate any pointers.
To answer your question, the way to pipe scroll events is to use the sync property of scrollview to get updates on scroll.
That is..
scrollview.sync.on('start',function(e){ // Do Something });
scrollview.sync.on('update',function(e){ // Do Something });
scrollview.sync.on('end',function(e){ // Do Something });
However for rendering objects in sync and ensuring precision on such, I have found the Engine prerender function to be wonderful.
So I would do something like this.
Engine.on('prerender',function(){
// Divide by scalar to get effect
var parallaxEffect = 2.0
var bgPos = -contentScrollview.getPosition() / parallaxEffect;
imageView.state.setTransform(Transform.translate(0,bgPos,0)));
})
Hope these pointers help!
This is a bit of a lazy answer, but let me link you to one of the famous demos created by their HackerLab alumni. It demonstrates using famous to create some complex scrolling/swiping animations.
I've learned a lot about Famo.us from the code in the demos, however this hasn't been made available to those outside the beta list yet. So I cloned the project files.
UltraVisual: A Parallax Scrolling Demo
https://github.com/KraigWalker/famous-UltraVisual
A more advanced scrolling animation demo
https://github.com/KraigWalker/famous-IFTTT
Hope this helps you out!
I am looking for widget which looks something like image shown bellow
I am not having any idea how to achieve this kind of image transformation, can anyone guide me from where I need to start or which is the android class I need to modify on order to have this, does anyone have any sample code which I can refer?
Thanks
You can achieved this by using the StackView feature. Check out below links,Hope this link help for you.
1) android-stackview
2) example
3) stacked card view
Is it possible to have a curve UISlider or is it just Horizontal and Vertical?
I've tried replacing the slider track with a curve image (though i already know hat it will not work because it is just a background), not working.
Is there a way that i could do that?
Take a look at custom controls (both of them are under MIT license):
MHRotaryKnob
Cocoacontrols
Github
DCKnob
Cocoacontrols
Github
I wrote this sample app to show how to use a Curve UIBezierPath and move an object through it
you can take a look at :
Curvy UISlider
I will try to update it.
No you can't do this with the UISlider, only in a straight line. You can rotate the whole slider to a degree you like with the transform property and use a function like CGAffineTransformMakeRotation. An example: How to use CGAffineTransformMakeRotation?.
You can also check out BezierSlider which allows you to customize the path and the selector.
am working on an app where i am loading one image from the bundle and with the help of quartz i am adding two red circles on that image, the image is loaded in the instance of the UIImageVIew class.
I want to save the image with the red circle, so far i have found only one method and thats
UIImageWriteToSavedPhotosAlbum(UIImage * image,id completionTarget,SEL completionSelector, void * contextInfo)
but its not working as it is saving the image from the bundle only, in some post i have read that it can be done using CALayer but i found no useful link to do that, i would be glad if you can post me the answer or any tutorial link to do that.
Here's a trick! Refer to Capture UIView here, you can capture the UIImageView snapshot and save it using UIImageWriteToSavedPhotosAlbum.
Any tutorials or sample code to get the Core Animation window flip effect? I'm using Flipr right now, which uses Core Image to generate the effect but CoreAnimation is much smoother
Thanks
Mike Lee released some code for just this a while back. He called it LemurFlip.
take a look at uli kusterers windowflipper code.
http://www.zathras.de/angelweb/sourcecode.htm (search for WindowFlipper)
have no experience with it, but it just might work for you :)
I added some code on how I do it using Core animation: Link