我不明白为什么我的项目不起作用。我可以打开窗口,但滚动视图不会滚动,这意味着我看不到 UI 的底部。为什么?我阅读了类似问题的答案,但它们并没有帮助我解决问题。
这是细节VC.H
@interface DetailVC : UIViewController {
IBOutlet UIImageView *iv_main, *iv_ratings;
IBOutlet UITextField *tf_name, *tf_dob, *tf_age, *tf_weight, *tf_height,*tf_birthplace;
IBOutlet UITextView *tv_description;
IBOutlet UIButton *but_movies, *but_edit;
IBOutlet UINavigationBar *navbar;
IBOutlet UIScrollView *scrollView;
}
@property (nonatomic, retain) IBOutlet UIImageView *iv_main, *iv_ratings;
@property (nonatomic, retain) IBOutlet UITextField *tf_name, *tf_dob, *tf_age, *tf_weight, *tf_height, *tf_birthplace;
@property (nonatomic, retain) IBOutlet UITextView *tv_description;
@property (nonatomic, retain) IBOutlet UIButton *but_movies, *but_edit;
@property (nonatomic, retain) IBOutlet UINavigationBar *navbar;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
@end
这是细节VC.M
#import "DetailVC.h"
@interface DetailVC ()
@end
@implementation DetailVC
@synthesize iv_main, iv_ratings, tf_age, tf_birthplace, tf_dob, tf_height, tf_name, tf_weight, tv_description, but_edit, but_movies,navbar, scrollView;
- (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 from its nib.
scrollView.contentSize = CGSizeMake(320, 1000);
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
------连接检查器
http://s18.postimg.org/qjzrdz9a1/Schermata_2013_08_07_alle_16_47_19.png
------滚动视图属性检查器
http://s8.postimg.org/5eniaq8r9/Schermata_2013_08_07_alle_17_35_04.png