我想創建一個UITextField
像找到iPhone。如何創建一個像查找iphone一樣的UITextField
我用於UITextField
後續代碼:
UIBezierPath *maskPathBotton = [UIBezierPath bezierPathWithRoundedRect:txtSenha.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(8.0, 8.0)];
txtSenha.borderStyle=UITextBorderStyleNone;
CAShapeLayer *maskLayerBotton = [CAShapeLayer layer];
maskLayerBotton.frame = txtSenha.bounds;
maskLayerBotton.path = maskPathBotton.CGPath;
maskLayerBotton.fillColor=[UIColor whiteColor].CGColor;
maskLayerBotton.strokeColor=[UIColor lightGrayColor].CGColor;
maskLayerBotton.lineWidth=1.5;
[txtSenha.layer addSublayer:maskLayerBotton];
但結果不太好。
在角落裏,筆畫比其他線條略有不同。我如何創建相同的UITextField
。對不起,我的英文,沒有圖片,我沒有足夠的聲譽來上傳圖片。
編輯: 的UITextField從查找iPhone
而這,就是我可以。
此行
相反,它是根本不清楚你正在嘗試做的。你是否試圖創建一個具有UITextView外觀的自定義視圖,以及圍繞它的框? –
這就像兩個UITextField together.I更新與圖像的鏈接的帖子。 – Marlon
如果我沒有錯,它是uitextfield在side cell中的一個可用視圖。 –