我是 iOS 新手,遇到UIScrollView
. 卷轴在此不起作用,请您帮帮我:
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 310,300, 999)];
label.text = self.selString;
label.numberOfLines = 0;
// [self.view addSubview:label];
UIImageView *image =
[[UIImageView alloc] initWithFrame:CGRectMake(10, 20, 300, 300)];
image.backgroundColor = [UIColor greenColor];
image.tag = 50;
image.userInteractionEnabled=YES;
image.autoresizesSubviews = YES;
image.alpha = 0.93;
image.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://opensum.in/app_test_f1/45djx96.jpg"]]]; // working code
//[self.view addSubview:image];
self.title = @"Full Blog";
CGRect scrollViewFrame = CGRectMake(0,0, 320, 999);
scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
scrollView.pagingEnabled =YES;
[self.view addSubview:scrollView];
scrollView.tag=1000;
[scrollView addSubview:label];
[scrollView addSubview:image];