P
P
PavelS_IT2017-03-06 12:10:32
iOS
PavelS_IT, 2017-03-06 12:10:32

Setting Navigation Bar and TextField in Swift?

Two questions arose, maybe someone knows how to solve it or has come across it:
1) There is a navigation controller and a view controller associated with it. The problem is that the status bar becomes the color of the navigation bar (light gray), but it needs to remain white. I can't figure out why it's like this, because the location is correct for both the status bar (y = 0, height = 20) and the navigation bar (y = 20, height = 44)
2) There is a standard alert. It's easy to add 2 textFields to it. Is it possible to make them separated by 3 pixels and have no borders? I have them go under each other, separated by a mountain line.
I would be very grateful for your help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PavelS_IT, 2017-03-07
@PavelS_IT

I solved the second question)
If anyone is interested:
//delete borders

for textfield in alertForm.textFields! {
            let container = textfield.superview;
            let effectView = container?.superview?.subviews[0];
            if (effectView != nil) {
                container?.backgroundColor = UIColor.clear
                effectView?.removeFromSuperview();
            }
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question