我一生都无法弄清楚为什么这段代码不起作用:
@username_textfield = UITextField.alloc.initWithFrame([[50,50],[50,50]])
@username_textfield.layer.cornerRadius=1
@username_textfield.layer.masksToBounds=true
@username_textfield.layer.borderColor= UIColor.redColor
@username_textfield.layer.borderWidth= 1
self.view.addSubview(@username_textfield)