Apply blur effect on tap or selected area if UIImageView - ios

I have a simple setup:
UIViewController->UIView->UIImageView
I want to achieve blur on UIImage which is loaded in UIImageView only on the area that user select or tap or move the finger.
Is it possible using UIVisualEffectView?

Related

How to move resizableUIView from its corner in Swift?

enter image description here
I have created this screen using four rounded button on corners. and i need to resize view from all four button tapped event. on the button direction
This is what i need to do.

Setting background of view to an image that is able to pinch zoom

I have created a game where a map is on the screen. With this map I would like to have buttons to change scenes and preform actions. The map I have on the screen I would like to be the full screen with pinch zoom capability, along with capability of a button or label to be on top of the image, without the button being zoomed in on or below the scroll view. I tried using a UIScroll View but the button kept zooming in and going below the image. How can I set the background of my View to a pinch zoomable image with labels and buttons on top not being effected in swift and xcode 7?
I am not sure if this is the most efficient way, but by calling the method touchesDidBegin() you can move the objects like the TextField and the buttons to a new view that is above the scrollview. Then when touchesDidEnd() you can move them back into the scrollview.

gradient background iOS

This rectangular region has a gradient background which is also transparent. Texts can be written on the rectangle. The colour of the rectangle changes when the user touches it. When the user releases it, it takes you to a new screen. How should something like this be implemented in iOS?
Use
UIImageView with gradient backgroundImage
set its alpha to 0.6 -.75 so that background view is visible
Use Tap gesture recognizer on ImageView to change background Image when user tap and navigate to next view

Display custom overlay image when button is pushed

The Goal:
I would like to add a method to my UIButton which randomly displays the following;
An image in the middle of the overlay displaying a picture
A UIButton at the top-right (red 'x') that closes the overlay
Various UILabels with information
How would I go about creating an overlay, and how would I customize the layout of the overlay and assign values and images dynamically?
I know how to create a custom cell for a UITableView, but I need a bit of guidance on this one.
Use IB or create by program a UIImageView to contain your image on top of the overlay. Then just use the button to toggle the image view between hidden (property of UIimageview) and not. Alternatively you may position push the image view to top and put it down to the bottom of the view heap using the button.

UIButton custom image alpha

I have some buttons close to each other in a logo shape, they are non rectangular shapes and I was wondering if I can exclude the transparent parts of the button from receiving touches, so that the elements behind it can receive the touches instead?.
Can you make the alpha parts of the button image not part of the button? , or , if the user touches these alpha parts, the button below will be tapped?
You would normally have to subclass UIButton, but luckily someone has taken care of this for you already:
https://github.com/ole/OBShapedButton
This seems to be exactly what you're looking for.

Resources