小编Jar*_*rom的帖子

我试图隐藏一个scrollView,它没有隐藏

好吧,这是一个令人尴尬的简单问题,但我无法让这个工作正常!我有两张uiscrollviews,我已经在IB的各个地方联系过了.在viewDidLoad上,我只希望第一个可见.所以我mkae两个scrollViews:

    [scrollView1 setBackgroundColor:[UIColor blackColor]];
[scrollView1 setCanCancelContentTouches:NO];
scrollView1.clipsToBounds = NO;    // default is NO, we want to restrict drawing within our scrollview
scrollView1.indicatorStyle = UIScrollViewIndicatorStyleWhite;

scrollView1.minimumZoomScale = 1;
scrollView1.maximumZoomScale = 5;
scrollView1.delegate = self;
[scrollView1 setScrollEnabled:YES];

imageView31 = [[UIImageView alloc] initWithImage:firstImage];

[scrollView1 addSubview:imageView31];
//[scrollView1 setFrame:CGRectMake(0, 0, 1024, 660)];


[scrollView2 setBackgroundColor:[UIColor blackColor]];
[scrollView2 setCanCancelContentTouches:NO];
scrollView2.clipsToBounds = NO;    // default is NO, we want to restrict drawing within our scrollview
scrollView2.indicatorStyle = UIScrollViewIndicatorStyleWhite;

scrollView2.minimumZoomScale = 1;
scrollView2.maximumZoomScale = 5;
scrollView2.delegate = self;
[scrollView2 …
Run Code Online (Sandbox Code Playgroud)

iphone show-hide uiscrollview uiimageview

1
推荐指数
1
解决办法
812
查看次数

标签 统计

iphone ×1

show-hide ×1

uiimageview ×1

uiscrollview ×1