Closed iZeDeveloper closed 8 years ago
@zeshanhayder can you attach screenshots or video?
Added Comment
Lost Focus
After getting focus back.
What is placeholder? The MESSAGE
?
ye
@zeshanhayder, could you show me your code?
i just implemented .placeholder property of your category and included category as well.
self.tvMessage.textColor = placeHolderColor; self.tvMessage.placeholder = eloc; self.tvMessage.delegate = self;
Which environment did you test?
ios 9 - iphone 6
Does it occur with bare project? I've tested with this code but cannot reproduce the issue.
#import "ViewController.h"
#import "UITextView+Placeholder.h"
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
UITextView *textView = [[UITextView alloc] init];
textView.frame = CGRectMake(0, 20, CGRectGetWidth(self.view.bounds), 100);
textView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
textView.placeholder = @"My Placeholder";
textView.font = [UIFont systemFontOfSize:15];
[self.view addSubview:textView];
UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(didTapBackground)];
[self.view addGestureRecognizer:recognizer];
}
- (void)didTapBackground {
[self.view endEditing:YES];
}
@end
thats strange. it happens to me everytime.
@zeshanhayder On your real iPhone 6 device? (Unfortunately I don't have iPhoen 6 device :cry:)
no even on simulator it does the same. i will try to upload a video asap i got free time
@zeshanhayder Thanks.
Please reopen it when you available :)
UiTextView resets the text inside it and places placeholder label even if there is text inside textview written by user. unfocus the textview and then focus again... all text cleared.