VerticalButton.m 639 B

123456789101112131415161718192021222324252627
  1. //
  2. // VerticalButton.m
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/23.
  6. //
  7. #import "VerticalButton.h"
  8. @implementation VerticalButton
  9. - (CGSize)intrinsicContentSize{
  10. CGSize newSize;
  11. newSize.width = MAX(CGRectGetWidth(self.imageView.frame), CGRectGetWidth(self.titleLabel.frame));
  12. newSize.height = CGRectGetHeight(self.imageView.frame) + CGRectGetHeight(self.titleLabel.frame);
  13. return newSize;
  14. }
  15. /*
  16. // Only override drawRect: if you perform custom drawing.
  17. // An empty implementation adversely affects performance during animation.
  18. - (void)drawRect:(CGRect)rect {
  19. // Drawing code
  20. }
  21. */
  22. @end