0

助けを借りずにスクロールバーを配置したいxibのですが、このコードを使用していますが、レベルなどを追加すると.

    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:self.view.frame];
    scrollView.contentSize   = CGSizeMake(1947, 1800);
    scrollView.showsHorizontalScrollIndicator=YES;
    scrollView.showsVerticalScrollIndicator=YES;
    // [imageView release];
    [self.view addSubview:scrollView];
4

1 に答える 1

0

私はあなたの質問を完全に理解していません。これがあなたを助けますように。

    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0.0, 0.0,1024,668)];
    scrollView.contentSize = CGSizeMake(1024,768);
    scrollView.delegate = self;
    scrollView.pagingEnabled = YES;
    scrollView.showsHorizontalScrollIndicator = YES;
    scrollView.showsVerticalScrollIndicator =YES;
    scrollView.alwaysBounceHorizontal = YES;
    scrollView.delaysContentTouches = NO;
    scrollView.canCancelContentTouches = NO;
    scrollView.bounces = YES;
    scrollView.bouncesZoom = YES;
    scrollView.scrollEnabled = YES;
    scrollView.directionalLockEnabled = YES;
    scrollView.minimumZoomScale = 0.5;
    scrollView.maximumZoomScale = 5.0;
    scrollView.scrollsToTop = YES;
    scrollView.backgroundColor=[UIColor clearColor];
    [self.view addSubview:scrollView];
于 2013-09-13T05:18:11.423 に答える