我在NSArray中有多张照片,我想以完整的手势以不使用Three20的方式显示它们。那我该怎么办呢?

最佳答案

使用scrollView实现以下目的:

UIScrollView * scroller = [[[UIScrollView alloc] initWithFrame:CGTectMake(0, 0, 320, 480)] autorelease];
scroller.pagingEnabled = YES;
[self.view addSubview:scroller];

int x = 0;

for (int i = 0; i < [yourArray count]; i++){

    UIImageView * myImageview = [[[UIImageView alloc] initWithFrame:CGRectMake(x, 0, 320, 480)] autorelease];
    [myImageview setImage:[yourArray objectAtIndex:i]];
    [scroller addSubview:myView];

    x += myView.frame.size.width;

}

[scroller setContentSize:CGSizeMake(x, 480)];

10-07 16:22