RefreshLayoutViewController.m 768 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // RefreshLayoutViewController.m
  3. // Demo
  4. //
  5. // Created by IEMacBook01 on 21/05/16.
  6. // Copyright © 2016 Iftekhar. All rights reserved.
  7. //
  8. #import "RefreshLayoutViewController.h"
  9. #import "IQKeyboardManager.h"
  10. @interface RefreshLayoutViewController ()
  11. @property (strong, nonatomic) IBOutlet NSLayoutConstraint *textViewHeightConstraint;
  12. @end
  13. @implementation RefreshLayoutViewController
  14. - (IBAction)stepperChanged:(UIStepper *)sender
  15. {
  16. [UIView animateWithDuration:0.1 animations:^{
  17. self.textViewHeightConstraint.constant = sender.value;
  18. [self.view setNeedsLayout];
  19. [self.view layoutIfNeeded];
  20. }];
  21. }
  22. - (IBAction)reloadLayoutAction:(UIButton *)sender
  23. {
  24. [[IQKeyboardManager sharedManager] reloadLayoutIfNeeded];
  25. }
  26. @end