William
William

Reputation: 1895

iOS - Setting alpha to view causing in showing strange border to appear

Basically I am doing a recursive search to set the alpha of all child views to 0.5.

Later I want to set the alpha back to their original values, so I set the alpha to 1.0f. But it results in this:

enter image description here

If I click in the UITextField, lines disappear. How can I restore all my subviews to their default alpha without this strange border appearing?

Upvotes: 0

Views: 52

Answers (1)

Duncan C
Duncan C

Reputation: 131426

This sounds like an XY problem. You should not be messing with the view hierarchy of system controls like UITextFields.

If you set the alpha of a superview it affects the alpha of that view and all of it's subviews, so there shouldn't be any reason to do this.

Upvotes: 1

Related Questions