Try this code.
UIColor *borderColor = [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0];
myTextView.layer.borderColor = borderColor.CGColor;
myTextView.layer.borderWidth = 1.0;
myTextView.layer.cornerRadius = 5.0;
change borderWidth and cornerRadius value to get exact ui as UITextField.