Removing specific area from blurred space MKMapView - ios

Is there any chance to remove blur on a specified area to achieve something like below? Assume that I have blurred MKMapView and want to remove circle shaped blurred area from MKMapView. Any other opinions to achieve something like this would be appreciated.

Related

Overlay MapView with hole

I would to add an overlay on mapView with a hole.
So, I would add a black transparent overlay on my map and on a specific position I would to have this hole through which I can see the map without black overlay.
In this hole I have to show my results. Is possible this?
(1)If the overlay could be a simple imageview. Just prepare a png file with full transparent hole and black transparent background.
(2)If you need a dynamic view which might be different at run time, I think the best approach is to prepare a similar image from (1), then apply it as layer mask.
Here is a tuto:https://www.youtube.com/watch?v=H6V_PbCKEO8

MKCircle overlay inverted

I've found this post how to draw circle overlay around location
Draw a circle of 1000m radius around users location in MKMapView
I'm able to set some color, or transparency or whatever for overlay.
but I'd like to do the same for rest of the map area.
F.e outside circle overlay sort of "terra incognita"
One possible solution in my mind is:
get circle coordinates, radius
create UIView overlay above mapView with shadow and blur radius respectively to mapView circle
simply saying I'd like to have something like this:
Any ideas how to achieve this?
I think you're thinking right. Howbeit, for make a blur background u need make screenshot and calculate blur with library GPUImage for example.

Cocos2d iOS: How to draw shadows underneath a CCNode

I'm building a simple card game and would like to draw shadows when users pick the cards up. Any quick solutions?
Example:
Quick solution? Draw a black shape (or whatever the shadow color is) on a layer behind your selected card. Just like in your example image you have a fuzzy gray square box behind, but yet slightly down and to the right, of another square that is on a layer on top of it. Or you can draw the shape underneath the card and move the card a little to give the illusion of it rising.

UIimageview fit to round shape

I have an UIImageview that contains a circle (The obstacle) and then another UIImageview that contains another image (my character). When my circle hits my character the game ends.
My problem occurs when the game ends on the character touching the UIImageview box that my circle is within, rather than the circle inside the UIImageview box.
The solutions I can think of are:
Make the UIImageview rounded to fit my circle.
Somehow detect a collision between my characters pixels and the circles pixels rather than the UIImageviews.
Help and ideas would be really appreciated. I am a beginner with xcode.
Thanks!
Couple of different techniques:
1)UIView#layer.cornerRadius - Super simple to implement, just set that one property. But really bad for scrolling elements like table views.
2)UIImageView as a mask - Also easy to implement. Basically make a square image with a transparent circle in the middle and slap it on top of your view with a new UIImageView. If your circle design has some reflections or styling, this might make your life easier.
3)Custom drawing - Make a UIView subclass and override drawRect to draw your image and clip it to a circular path.
Hope that helps!
EDIT:
You can read this answers.
1)Fill an UIBezierPath with a UIImage
2)iOS: Inverse UIBezierPath (bezierPathWithOvalInRect)
3)How to mask a square image into an image with round corners in the iPhone SDK?

Making a UIImage in UITableViewCell look recessed

This is sort of a photoshop question, I suppose, but does anybody know how to make a nice looking heart that's recessed? Sort of like this one, except recessed:
There are a few layer styles which can compliment each other to give you that recessed look.
A light drop shadow beneath the sprite (1px white shadow directly below usually does the trick, but you can experiment with its softness/size)
A gradient which is darker at the top and lighter near the bottom
A dark inner shadow which is at the top of the sprite. (1px black, for example)
If you're doing this in Photoshop, make sure to have the light angle set to 90ยบ
A basic letterpress effect can be achieved by having a white (or light coloured) drop shadow 1 point below the image. This is what is used in iOS for the status bar images and text, for example.
You may also want an inner shadow inside the top edge, and possibly a subtle gradient (lighterdarker at the top - note I have changed my mind on the gradient, but not updated the image!) instead of a solid background colour.
Here's a 5 minute bodge job done in Pixelmator. The inner shadow at the top is particularly amateurish, but I prefer drawing things like this in code!

Resources