Reputation: 88
I made a custom view and I called it in UINavigationController, I made it transparent but after I put it inside navigation controller I got that border, how to remove it? thanks in advance
Upvotes: 1
Views: 10841
Reputation: 596
Update on Swift 3+
yourview.layer.borderColor = UIColor.clear.cgColor
Upvotes: 1
Reputation: 831
Try to set border width of your view with 0
yourView.layer.borderWidth = 0
Upvotes: 8
Reputation: 5467
Try this code out. (91,158,236) is the color of your navigation bar.
yourview.layer.borderColor = UIColor(red: 91.0 / 255, green: 158.0 / 255, blue: 236.0 / 255, alpha: 1.0).CGColor
For a red View contained in navigation Bar for a borderWidth of 4.0 it would produce result like
Hope this helps.
Upvotes: 0
Reputation: 10205
You need to set the border color of your view transparent.
yourview.layer.borderColor = UIColor.clearColor()
This should work.
Upvotes: 1