Swift UIVibrancyEffect bug while adding as subview - ios

I´am adding a Vibrancy effect view as subview. When I animate its alpha it comes to this bug:
the view is in a xib with clear background and added to the blured effect view content like this:
let slider = Slider(nibName: "Slider", bundle: nil)
self.view.addSubview(slider)
It should just add the vibrancy effect to the blur view. What it does it friarly add the view with a gray background and then its drawing the vibrancy effect correctly. It should not give the user this gray from before it turns to the right effect.

Related

How to remove blur effect from UIProgressView / make progressView's background complete transparent?

Simple Requirement: A progress view with transparent background with no blur effect.
1st image: Expected progress view
2nd image: That's how it currently looks
3rd image: Visual effect applied by apple on UIProgressView
Issue: UIVisualEffect is interfering with requirement.
Setup: progressTintColor is set to white and trackTintColor to white with 30% opacity.
I have tried removing UIVisualEffect by looping through subviews and removing subview which is UIVisualEffectView but no luck!!!
for subview in blurView.subviews {
if subview is UIVisualEffectView {
subview.removeFromSuperview()
}
}
Any help would be greatly appreciated!

how to make visible other components in transparent UIVIEW in swift 5

I have used a UIVIEW . I want to make transparent the UIVIEW. But when I want to chage alpha 0.0 from storyboard for make UIVIEW transparent, textfield, label and other component also transparent. I want to make transparent UIVIEW, not other component of the view. Here is the image
Please help me to make visible other components in UIVIEW transparent
Set your UIView's backgroundColor to UIColor.clear.
Instead of changing the alpha of the UIView, you can make the background color of your UIView as white with alpha component 0.5 or something
myView.backgroundColor = UIColor.black.withAlphaComponent(0.5)
If you want it to be completely transparent, you can set backgroundColor to clear from storyboard as well as code.
myView.backgroundColor = .clear
You just need to change the transparency not of the UIView itself, but of its
background color.
For example:
I set the color of the UIView transparent, while the UILabel remained its settings.
In order to create a semi transparent color, you can use the following code:
yourView.backgroundColor = UIColor.white.withAlphaComponent(0.5)
Hope this will help you!
Go to Main.Storyboard and select the view you want to make transparent.
From the Attribute Inspector select background color as custom.
Then set your desired color and decrease the percentage of Opacity of the color.

XLPagerTabStrip black space

I am using XLPagerTabStrip for getting android tabtool in iosgetting black space like this but using this I am getting a black space between view and screen when I scroll the end point view controller why? and how to solve it?
class MyPagerTabStripName: ButtonBarPagerTabStripViewController {
super.viewDidLoad()
...
self.containerView.bounces = false // add this line to disable bounce
}
or if you want to keep bounce effect, you can set view's backgroundColor, like in your image, you can change backgroundColor to white.

View controller with background image and transparency xamarin

I kind of stuck with a design issue in iOS.
I have a controller with a background image, nothing special.
this.View.BackgroundColor = UIColor.FromPatternImage (UIImage.FromFile ("Images/ballons.jpg"));
On top of the controller I have a view with a background color (white) that is semi-transparent.
this.Frame = new System.Drawing.RectangleF (0, 0, UIScreen.MainScreen.Bounds.Width, UIScreen.MainScreen.Bounds.Height);
this.BackgroundColor = UIColor.White;
this.Alpha = 0.5f;
Now the issue is if I add a button or any other controls in my view they also becomes transparent...so am I thinking wrong here...?
I would like the controller to have a background image, the view a white semi-transparent background and all the controls (buttons, images) not to be transparent at all...
Do not change the Alpha of the view, since that will change the transparency of all its elements/subviews. Just set its BackgroundColor to a semi-transparent color using UIColor.FromWhiteAlpha(1, 0.5).

Blurred Navigation Bar with same background as UITableView

I am trying to achieve a similar effect to that of the Notes app on iOS in that I have a tableView with a background image and I want the navigation bar to have the same background image but without the text from the tableView overlapping.
Here is the tableView scrolled. As you can see, the text of the tableView overlaps that of the status bar and navigation bar. That is why I want the blur effect on the navigation bar.
In iOS8 there is a new UIView subclass called UIVisualEffectView.
You instantiate it with...
UIVisualEffectView *blurView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; // other styles available
or...
UIVisualEffectView *blurView = [[UIVisualEffectView alloc] initWithEffect:[UIVibrancyEffect notificationCenterVibrancyEffect]; // other styles available
You then can do one of two things.
Either add this in front of the views you want to show through. (Not a sub view but in front of the content).
Or you can take a view and set it as the contentView of the visualEffectView.
This will then automatically add the effect to the content. It even updates when the content is updated so if you have something animating behind it it will show the blurred animation for you.

Resources