Removing Glossy Effect on UITabBar - xcode

I know this is a common question but it's quite different in my case.
I want an image to be placed when the bar is active and I've done that successfully using these code under didFinishLoadingWithOptions method [[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:#"tabbar-active.png"]];
And that's what my app looks like
Now I just want to remove that glossy effect, not the blue image on the bar
Thanks in advance!

After digging a little bit, I found the solution for the same. You simply need to create an UIImage object with empty image.
[yourTabbar setSelectionIndicatorImage:[[UIImage alloc] init]];
Thats it :)

Related

UIPageViewController and transparent page backs

Can anyone help with a problem with UIPageViewController giving transparent page backs?
I have a project displaying mock-ups of old newspapers. I am setting double sided to true and have slightly blurred and mirrored images for the page backs.
One prototype version is okay and looks like this as a page turns:
However, an updated version with different background looks like this:
As you can see, the curled page back is now completely transparent.
I think the code is the same in each case although the UIView hierarchy is different.
Can anyone help me out by explaining what might be the cause?
Many thanks!
This problem appears to be due to the fact that I had a sublayertransform in place that was not the Identity matrix. Resetting before using UIPageViewController fixes it.
let noPerspective = CATransform3DIdentity
self.view.layer.sublayerTransform = self.noPerspective
This clearly interfered with UIPageViewController's animation.

How to use UIVisualEffectView with Objective-C

I've been looking for documentation on how to use the UIVisualEffectView with Objective-C in iOS8.
I've seen some code examples but would appreciate the steps to use the actual view in the Object Library. This is what I tried, which had no effect:
Create a new storyboard scene
Add a UIVisualEffectView
Add a UIImageView
Add a picture to the UIImageView
I want to have a blurred picture as the background for my scenes. Can someone point me to a tutorial or provide instructions?
Thanks
I have implemented a demo which demonstrates using UIVisualEffectView with vibrancy and also with vibrancy & blur. It uses a little bit different way of implementing via storyboard so look at https://github.com/Vaberer/BlurTransition.

subview of IKImageView appears below image instead of above

I have a IKImageView and a NSImageView as a subview. Subviews are supposed to get drawn above their master view. I tried an NSImageView with the same subview, and it worked fine, but I really need to be able to move the image around with the mouse, and zoom it with a slider, and I think IKImageView is a bit easier.
What happens is this:
As you can see, the small picture (subview) is below the image on the IKImageView, but in front of the background of IKImageView.
How can I fix this?
ps: Do you think I should use NSImageView? If so, how would I move it around, and zoom?
call addSubview again everytime after I set the IKImageView's image.
That work for me.

Blurry NSImageView

I have an NSImageView in a view that utilizes Core Animation. Prior to using Core Animation the image looks fine but now its blurry and low quality. If I let NSImageView have a bezel border the issue goes away but I need it to have no border. Had this happened to anyone else?
Imgae in the background with no border, same image in the front with a border.
Thanks
EDIT: I forgot to mention that the image is an icon file (ICNS) so it has various sizes. The bordered view loads the correct size and the transparent one loads the smallest and stretches it.
Although not the way I wanted to, I managed to create a fix for the issue. The issue seemed to be the way that NSImageView was drawing the image so I created a custom NSView subclass with support for the same bindings I used in my original image view. Im not sure why the blurry-ness happend in the beginning, but drawing the image by hand in an NSView seems to do the trick.
Your image may be drawing in a non-pixel-aligned way. Have you tried shifting it by a half pixel?
Apple has a good demonstration of this in the BlurryView app in their "Cocoa Tips and Tricks" sample code.
Cocoa Tips and Tricks

How to put overlay NSImageView and keep it at the top of a WebView?

How to put overlay view (NSImageView) and keep it at the top in front of a WebView ( which runs core animation or )?
Standard ordering in interface builder does not help.. imageview is shown in front of the webview but when i load the contents of webview with a tag or only just an html opacity animation, suddently webview takeovers the top position and shows over the imageview.
Can't i do this?
although two years passed, maybe this is solved by yourself or it no longer exists as a problem, i think an answer for this should be helpful for future viewers here :)
after found this question (even without replies below) http://www.cocoabuilder.com/archive/cocoa/223499-core-animation-how-to-swicth-off-all-implicit-animations.html I found this single line
[imageView setWantsLayer:YES];
will do the job. its because "a WebView seems to be using Core Animation layer-backed views"

Resources