speeddownloadsen.blogg.se

Why is my search bar black
Why is my search bar black













why is my search bar black why is my search bar black

  • thats it, you will have an rounded textField background with any color you want.
  • NavigationBar.textField?.layer.addSublayer(layer) NavigationBar.textField?.rnerRadius = 14 //Round it as you wish NavigationBar.textField?.layer.masksToBounds = true //to make sure you get the rounded corners

    And, then, type the placeholder and name attributes in the tag.

    And, then place the text value in the type attribute.

    Step 3: Now, we have to use the tag with the type attribute. And, then type the
    tag at that point.

  • Set the new layer as sublayer for textfield Step 2: Now, we have to place the cursor at that point in the body tag where we want to make a search bar.
  • Layer.backgroundColor = (0.5).cgColor //Set your color here Make a new layer with the size of the navigationBar So I share another answer wrote in Swift 4 with simplified logic: for textField in !.subviews where textField is UITextField ) as? UITextField Like all the answers before did not work as I would expect, either the answer did not work for me or it works but it needs too much "dummy" code.















    Why is my search bar black