ACFloatingTextfield
ACFloatingTextfield copied to clipboard
leftView and rightView??
Hello! I'm use the OC version. If I add leftView or rightView for ACFloatingTextfield, the text will be overlay with the leftView or rightView.
same issue
for this you will need to override the drawTextInRect method you can also check accessory branch for this Thanks
On Mon, 30 Oct 2017 at 2:34 PM, Sudhakar Varma Dasari < [email protected]> wrote:
same issue
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ErAbhishekChandani/ACFloatingTextfield/issues/42#issuecomment-340382933, or mute the thread https://github.com/notifications/unsubscribe-auth/ANMZ11Hqdhu8hShiCa2YaRzPH65Usa4Gks5sxZEvgaJpZM4QKn3C .
-- Thanks & Regards Er. Abhishek Chandani
I think it's should override the [ textRectForBounds:] and [ editingRectForBounds:]..
- (CGRect)textRectForBounds:(CGRect)bounds {
CGFloat left = 0;
CGFloat right = 0;
if (self.leftViewMode == UITextFieldViewModeUnlessEditing ||
self.leftViewMode == UITextFieldViewModeAlways) {
left = self.leftView.bounds.size.width + 10;
}
if (self.rightViewMode == UITextFieldViewModeUnlessEditing ||
self.rightViewMode == UITextFieldViewModeAlways) {
right = self.rightView.bounds.size.width;
}
return CGRectMake(4+left, 1, bounds.size.width-left-right, bounds.size.height);
}
- (CGRect)editingRectForBounds:(CGRect)bounds {
CGFloat left = 0;
CGFloat right = 0;
if (self.leftViewMode == UITextFieldViewModeWhileEditing ||
self.leftViewMode == UITextFieldViewModeAlways) {
left = self.leftView.bounds.size.width + 10;
}
if (self.rightViewMode == UITextFieldViewModeWhileEditing ||
self.rightViewMode == UITextFieldViewModeAlways) {
right = self.rightView.bounds.size.width;
}
return CGRectMake(4+left, 1, bounds.size.width-left-right, bounds.size.height);
}
same error how to solve it. i am using arabic language first letter missing. i need swift code. can please tell me
There is also swift code in github you can check source swift folder there for same Thanks
Sent from my iPhone
On 09-Oct-2018, at 2:57 PM, santhoshappdev [email protected] wrote:
i need swift code. can please tell me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Hello still facing problem ,anyone find solution Thanks
Will check it soon but will not be able check before a week Meanwhile please checkout the master branch and override the left value in drawTextInRect Method.
Thanks Abhishek
On Sun, 13 Dec 2020 at 6:58 PM, kirti Chavda [email protected] wrote:
Hello still facing problem ,anyone find solution Thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ErAbhishekChandani/ACFloatingTextfield/issues/42#issuecomment-744007919, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJRTV2FYBCZ4BX4HZSDQDDSUS6QJANCNFSM4EBKPXBA .
-- Thanks & Regards Er. Abhishek Chandani