Je vais essayer d'obtenir un UILabel pour faire défiler à l'intérieur d'un UIScrollView mais elle ne marche pas, faites défiler jusqu'

C'est dans mon .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;
}

C'est dans mon .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;

Mon Label est connecté à la Vue-Contrôleur, mon contentView est connecté à la Vue-Contrôleur, et mon summaryLabel est connecté à la Vue-Contrôleur. J'ai besoin de l'étiquette pour faire défiler et il n'est pas.

OriginalL'auteur Johnny Cox | 2012-07-02