Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. if (![transaction.notes isEqualToString:@"Additional Notes: "] && [transaction.notes length] > 0)
  2. {
  3. UIImageView *pin = [[UIImageView alloc] initWithFrame:CGRectMake(13, 30, 24, 25)];
  4. pin.image = [UIImage imageNamed:@"pin"];
  5. [customCell addSubview:pin];
  6. }
  7.  
  8. - (BOOL)textViewShouldBeginEditing:(UITextView *)textView {
  9.  
  10. if([[textView text] isEqualToString:@"Additional Notes: "]){
  11. [textView setText:@""];
  12. }
  13. return YES;
  14.  
  15. }
  16.  
  17. - (BOOL)textViewShouldEndEditing:(UITextView *)textView {
  18.  
  19. if([[[textView text] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] isEqualToString:@""]){
  20. [textView setText:@"Additional Notes: "];
  21. }
  22. return YES;
  23. }
  24.  
  25. - (BOOL)textViewShouldBeginEditing:(UITextView *)textView;
  26. - (void)textViewDidChange:(UITextView *)textView;
  27. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement