Sin descripción

BRPlaceholderTextView.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // PlaceholderTextView.h
  3. // SaleHelper
  4. //
  5. // Created by gitBurning on 14/12/8.
  6. // Copyright (c) 2014年 Burning_git. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface BRPlaceholderTextView : UITextView
  10. @property(copy,nonatomic) NSString *placeholder;
  11. @property(strong,nonatomic) NSIndexPath * indexPath;
  12. //最大长度设置
  13. @property(assign,nonatomic) NSInteger maxTextLength;
  14. //更新高度的时候
  15. @property(assign,nonatomic) float updateHeight;
  16. /**
  17. * 增加text 长度限制
  18. *
  19. * @param maxLength <#maxLength description#>
  20. * @param limit <#limit description#>
  21. */
  22. -(void)addMaxTextLengthWithMaxLength:(NSInteger)maxLength andEvent:(void(^)(BRPlaceholderTextView*text))limit;
  23. /**
  24. * 开始编辑 的 回调
  25. *
  26. * @param begin <#begin description#>
  27. */
  28. -(void)addTextViewBeginEvent:(void(^)(BRPlaceholderTextView*text))begin;
  29. /**
  30. * 结束编辑 的 回调
  31. *
  32. * @param begin <#begin description#>
  33. */
  34. -(void)addTextViewEndEvent:(void(^)(BRPlaceholderTextView*text))End;
  35. /**
  36. * 设置Placeholder 颜色
  37. *
  38. * @param color <#color description#>
  39. */
  40. -(void)setPlaceholderColor:(UIColor*)color;
  41. /**
  42. * 设置Placeholder 字体
  43. *
  44. * @param font <#font description#>
  45. */
  46. -(void)setPlaceholderFont:(UIFont*)font;
  47. /**
  48. * 设置透明度
  49. *
  50. * @param opacity <#opacity description#>
  51. */
  52. -(void)setPlaceholderOpacity:(float)opacity;
  53. @end