iOS Blur Background like iTunes Remote App - ios

I'm new here so please bear with me.
Can you please help me make a transparent blured background like the one used in iTunes Remote iOS7 app in the store? Also, how is the text masked?
Screenshot here:
(source: rackcdn.com)

I found the "UIImage+ImageEffect" class made by Apple, in a WWDC example Apple posted here: https://developer.apple.com/downloads/index.action?name=WWDC%202013#.
Using this class, is's really simple to blur an image with this code: [image applyLightEffect]
where image as an instance of UIImage.
Here are the steps i took to make the text look like it's "cut" from the background view. Use this layering order:
Blurred Image
View with lower opacity (ex 80%) filled with a color. I used a white background color.
2.1. Set a label as a child of this view and set the tint color to Black.
Add any other content you want on top.
And voila! It magically works!

Use UIToolBar of UIKit framework which automatically comes with blur and transparent effect on background view (live).
Reason - Since UIToolBar inherits UIView so fundamentally there is no issue in using it in place of UIView.

Related

How to change background color of a UIImagePickerController's Table View?

Using the UIImagePickerController to bring up the following window.
Am able to change the navigation bar color and their text attributes no problem.
How to change the background of this table view's cells AND the background color of this tableView?
Basically all the area that has been painted red is the area I'm trying to change the color of. Please help. Thank you.
UIImagePickerController is not intended to be modified. It should have the system default style and if you modified that, your app will get rejected.
If you want to customize it, you need to look at some custom image picker, not the one that is provided to you by default.

Multi-colored Shadow Swift

In the iOS music app, I've noticed the shadow underneath album artwork changes based on the color of the artwork. This shadow can also be multi-colored based on how the color at the edge of the artwork changes.
Does anyone know how to recreate this effect programmatically?
Thanks to #Josh Homann for pointing me in the right direction, but the answer was actually much more complex.
The first (bottom) UIView in the hierarchy should have a plain white background and be pinned to the edges of the screen.
The next view should be a UIImageView with an alpha of 0.75.
Then you should add a UIVisualEffectView with the same dimensions as the first view.
Finally, add another UIImageView that is the same size as the first UIImageView.
Your IB hierarchy should look similar to this:
The final result is this:
Its not a shadow its a UIVisualEffectView with a blur. Add a second image view under your image view with a larger size and add a blurring visualEffectView to it.
Sorry to revive an old question, but this library nailed it: ShadowImageView.
It uses CIFilter which gives you more control over the blur effect and better results.

How to specify vibrant appearance for secondary Today Centre widget text?

I am working on my first Today Centre widget, which simply consists of three labels on the default storyboard. It's working fine, but I read in the iOS Human Interface Guidelines that secondary text should "use the system-provided vibrant appearance" with notificationCenterVibrancyEffect.
What's the correct way to add this vibrancy effect to my two secondary labels? I've read about UIVisualEffectView, but it's still not clear to me how to use it for this purpose. I don't think I want to put a blurred view behind my labels because Notification Centre already blurs the background.
UIVisualEffectView when configured with a UIVibrancyEffect is meant to be used as a container—just drop your labels in its contentView and you’ll get the appropriate appearance on top of the Notification Center blur. The text color doesn’t matter; when it’s added to the contentView it gets special treatment and effectively always renders with the same appearance, though you can still adjust the alpha of the view (not of the text color) to make it more or less prominent.
good day, first of all u should use a correct view hierarchy, when U add some objects in your VisualEffectView example:
UIVibrancyEffect used in combination with UIVisualEffectView, adjusts the colors of the content to make it feel more transparent. UIVibrancyEffect can blending some objects
with the background example:
More particularly to your question(https://stackoverflow.com/a/25392645/4912496) Apple recommends to use vibrant effect for secondary text, because its simply beautiful for example(apple native app use vibrant effect, and Sports.ru don't use it):
But, some apps don't use this effect...
To ensure that your widget gets the vibrancy effect that’s appropriate for displaying items in the Today view, use notificationCenterVibrancyEffect.
Some info. https://www.omnigroup.com/developer/how-to-make-text-in-a-uivisualeffectview-readable-on-any-background

Add color to white bounce area of UIWebView

I'm trying to add a beige color to the bounce white space area that appears when dragging this WebView off screen. I've tried setting the WebView and WebView.ScrollView background colors manually and also setting them to transparent with opaque set to false having the ViewController's view background color set to beige - no luck. I also read in some of the objective-C iOS threads that adding a SubView with the background color I want to the WebView would do the trick, but could not get this to work in Mono.
The background of the Web content has been set in the HTML code of the document.
I wish I could post an example image, but don't have 10 rep yet. Feel free to ask for a better description.
Can anyone shed some light on how to accomplish this?
I set the background colour of my webView to clearColor in my nib file and for me it works fine:
Let me know if it still doesn't work for you.

Cut out image of UIView to reveal background tint

I currently have a main UIView that I have subclassed and set a custom background colour from a UIImage.
I also have a .png with a transparent background - lets call it myImage.png.
I want to be able to add the myImage.png to the main view so that I am able to animate the non-transparent portion of my UIImage. I assume that this could be achieved with the use of layers and image masking but I would really appreciate an example to get me started.
EDIT
To clarify, I am interested in knowing how I can use core graphics to cut out the myImage.png and reveal a tint colour. I can then animate this tint colour to give a flashing effect. I am able to animate the image without a problem, so I need a solution to the problem of 'cutting out' the image and revealing a background tint that I my animate in and out.
I am using iOS6
Thanks in advance.
You can play around with CAGradientLayer, CATransformLayer, CAReplicatorLayer.
As I understand your question you have a .png with transparent background and you want to animate the non-transparent part of this .png (myImage.png) you want to add myImage.png to your main view with an animation. Take a look of this apple documentation link of Core Animation
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/CreatingBasicAnimations/CreatingBasicAnimations.html
It will help you with what you want

Resources