99#import < UIKit/UIKit.h>
1010
1111@interface ScrollViewController : UIViewController <UIScrollViewDelegate>
12+ @property (weak , nonatomic ) IBOutlet UIScrollView *longScrollview;
1213@property (weak , nonatomic ) IBOutlet UIScrollView *scrollView;
1314@end
1415
@@ -23,6 +24,25 @@ - (void)viewDidLoad
2324 self.scrollView .contentSize = CGSizeMake (2000 , 2000 );
2425 self.scrollView .delegate = self;
2526
27+ self.longScrollview .accessibilityLabel = @" Long Scroll View" ;
28+ CGFloat longScrollViewHeight = CGRectGetHeight (self.longScrollview .bounds ) * 2 ;
29+ self.longScrollview .contentSize = CGSizeMake (CGRectGetWidth (self.longScrollview .bounds ), longScrollViewHeight);
30+ self.longScrollview .backgroundColor = UIColor.redColor ;
31+
32+ UILabel *topLabel = [[UILabel alloc ] init ];
33+ topLabel.text = @" THIS IS THE TOP" ;
34+ topLabel.accessibilityLabel = @" Top Label" ;
35+ topLabel.textAlignment = UITextAlignmentCenter;
36+ [self .longScrollview addSubview: topLabel];
37+ topLabel.frame = CGRectMake (0 , 0 , CGRectGetWidth (self.longScrollview .bounds ), 40 );
38+
39+ UILabel *bottomLabel = [[UILabel alloc ] init ];
40+ bottomLabel.text = @" THIS IS THE BOTTOM" ;
41+ bottomLabel.accessibilityLabel = @" Bottom Label" ;
42+ bottomLabel.textAlignment = UITextAlignmentCenter;
43+ [self .longScrollview addSubview: bottomLabel];
44+ bottomLabel.frame = CGRectMake (0 , longScrollViewHeight - 40 , CGRectGetWidth (self.longScrollview .bounds ), 40 );
45+
2646 UIButton *bottomButton = [UIButton buttonWithType: UIButtonTypeRoundedRect];
2747 [bottomButton setTitle: @" Down" forState: UIControlStateNormal];
2848 bottomButton.backgroundColor = [UIColor greenColor ];
0 commit comments