The borderStyle
property of UITextField
is set to UITextBorderStyleNone
by default. That might be why it doesn't appear to be visible. Try this:
urlField.borderStyle = UITextBorderStyleRoundedRect;
On another note, when my view doesn't show up as expected, I usually try to display its border to help me figure out if it's actually on the screen.
view.layer.borderWidth = 1.0f;
view.layer.borderColor = [[UIColor magentaColor] CGColor];