mysterious white antialiasing behind UIImageView - ios

I'm using a PageViewController to swipe through a series of daily ViewControllers for a week.
The UIViewController that contains the pageViewController contains a few navigation items that do not scroll with the pageViewController. These stay stationary as you swipe. One of these items is a UIImageView, more specifically a UIButton with an UIImageView image representation.
The trouble I'm having is that this stationary UIImageView has a thin white border to it when it should not. I'm giving it a rounded appearance by using rounded corners that are the size of the image. It is easiest seen in this photo. Note, the white "halo" is not part of the image, it appears for any image. The borderColor, imageBackground, view background, and parent view backgrounds are all clearColor. The red background below is part of the swipeable viewController. Interestingly, the white border only appears when it is stationary. If the image/button is placed in the swipeable View it looks great.
Any thoughts how I can get rid of this white antialiasing?

I changed the button's image from using the backgroundImage to just the image property and the white went away entirely. Glad for an easy fix, hope this helps someone else.

Related

Partially show imageview

I am trying to create an animation where an image view is moving up and down vertically. I have a line that the imageview is passing through, and my intention is to have the imageview hide partially when passing through the line. For example, if the line is halfway between the imageview, then the bottom half of the imageview should be hidden. Therefore, it would be ideal if there was a library of function that could hide a fraction of the imageview based on a specified y position. Please find examples of what I mean in the attached screenshots.
In this screenshot, the part of the circle (imageview) underneath the line should be hidden, but the top half should be shown.
Also, keep in mind that the background is a changing gradient so I wouldn't be able to use a rectangular view with the same background color to hide the circle.

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.

Stroke Around View From Keyboard

I have a dark background in my application. When the keyboard comes on screen it creates a stroke around the view that contains the UITextField or UITextView. Is this a bug? Does anyone know of a workaround?
In the picture attached you'll see a white stroke going around the view under the top bar.

uiimageview transparent to rearmost layer

I have a question concerning an uiimageview. I have multiple ImageViews overlapping each other and one background image(view). The ImageViews are moving in a carousel.
I want all uiimagesviews which are rotating in a carousel (and overlapping each other) to be only transparent to the background image. Otherwise I see the border of the next uiimageview which is overlapping.
How to achieve this?
EDIT: Added Screenshot to show the problem at overlapping items:

UIScrollView with a background set to the blurred image

I have a UIScrollView that shows certain images based on an index. When an image loads, I want to set the background of the UIScrollView to the blurred version of that image.
Right now I have a container view that houses the scrollView, and I've been trying to add a blurred subView to the container but it's not working out. If I just add the subview it gets rendered over the scrollView which id obviously no good, and If I add the subView and send it to back then I don't see any blurred effect at all.
Is this the right approach or is there a better way to achieve the effect I'm going for?
As you said "and If I add the subview and send it to back then I don't see any blurred effect at all."
To sort it out, You may try changing the background color of Scrollview to clearColor.

Resources