我在viewDidLoad中对我的ViewController下面的代码:添加滚动视图的iOS的Objective-C
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:204.0/255 green:00.0/255 blue:00.0/255 alpha:1];
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]];
autoNameLabel.text = (NSString *)[vendorDetails objectForKey:@"autoname"];
homeLabel.text = (NSString *)[vendorDetails objectForKey:@"homelab"];
descriptionTextView.text = (NSString *)[vendorDetails objectForKey:@"description"];
这一切都完全符合上的视图。我知道需要在底部添加一个额外的textView,因此需要用户能够滚动以查看它。我如何将此信息添加到可滚动视图并添加我的其他textView?
如果你还想要,你也可以在xib中做大部分工作。 – atreat
我尝试过使用XIB并简单地拖动滚动视图,然后拖动其下的其他视图,但仍然不滚动。 – user989557
你需要调整你的contentSize。这是最重要的一部分。我不相信你可以在xib中做到这一点,但也许。如果不使用上面的代码示例。 – atreat