JCHATSelectImgCollectionView.m 809 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // JCHATSelectImgCollectionView.m
  3. // JChat
  4. //
  5. // Created by oshumini on 15/12/22.
  6. // Copyright © 2015年 HXHG. All rights reserved.
  7. //
  8. #import "JCHATSelectImgCollectionView.h"
  9. @implementation JCHATSelectImgCollectionView
  10. /*
  11. // Only override drawRect: if you perform custom drawing.
  12. // An empty implementation adversely affects performance during animation.
  13. - (void)drawRect:(CGRect)rect {
  14. // Drawing code
  15. }
  16. */
  17. - (void)setContentSize:(CGSize)contentSize
  18. {
  19. if (!CGSizeEqualToSize(self.contentSize, CGSizeZero))
  20. {
  21. if (contentSize.height > self.contentSize.height)
  22. {
  23. CGPoint offset = self.contentOffset;
  24. offset.y += (contentSize.height - self.contentSize.height);
  25. self.contentOffset = offset;
  26. }
  27. }
  28. [super setContentSize:contentSize];
  29. }
  30. @end