这是我的.m
- (void)viewDidLoad
{
[super viewDidLoad];
[self.scrollView addSubview:self.contentView];
self.scrollView.contentSize = self.contentView.bounds.size;
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
NSMutableArray *arr = [[NSMutableArray alloc]init];
arr = [Singleton getArray];
NSString *str = [arr componentsJoinedByString:@"\n"];
summaryLabel.text = str;
}
这是我的.h
@interface TotalViewController : UIViewController
{
UIScrollView *scrollView;
UIView *contentView;
}
@property (nonatomic, retain) IBOutlet UIScrollView * scrollView;
@property (nonatomic, retain) IBOutlet UIView * contentView;
@property (nonatomic,strong) IBOutlet UILabel * summaryLabel;
我的标签连接到视图控制器,我的内容查看连接到视图控制器,和我的summaryLabel连接到视图控制器。 我需要的标签滚动和事实并非如此。