IOS问题
#import "EXFifthViewController.h"
@interface EXFifthViewController ()
@end
@implementation EXFifthViewController
@synthesize scrollView;
@synthesize textView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[scrollView setContentInset:UIEdgeInsetsMake(0, 0, 800, 0)];
[self resizeTextView];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)resizeTextView
{
CGRect frame = textView.frame;
frame.size.height = textView.contentSize.height;
[textView setFrame:frame];
}
- (IBAction)buttonTest:(id)sender
{
[self resizeTextView];
}
@end
#import <UIKit/UIKit.h>
@interface EXFifthViewController : UIViewController
{
}
- (IBAction)buttonTest:(id)sender;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UITextView *textView;
- (void)resizeTextView;
@end