- (void)initGuide
{
UIScrollView *scrollView = [[UIScrollViewalloc] initWithFrame:CGRectMake(0,0, ScreenWidth,ScreenHeight)];
scrollView.Delegate=self;
[scrollView setContentSize:CGSizeMake(1280,0)];
[scrollViewsetPagingEnabled:YES]; //视图整页显示
UIImageView *imageview = [[UIImageViewalloc] initWithFrame:CGRectMake(0,0, ScreenWidth,ScreenHeight)];
[imageviewsetImage:[UIImageimageNamed:@"guide1.png"]];
[scrollViewaddSubview:imageview];
[imageviewrelease];
UIImageView *imageview1 = [[UIImageViewalloc] initWithFrame:CGRectMake(320,0, ScreenWidth,ScreenHeight)];
[imageview1setImage:[UIImageimageNamed:@"guide2.png"]];
[scrollViewaddSubview:imageview1];
[imageview1release];
UIImageView *imageview2 = [[UIImageViewalloc] initWithFrame:CGRectMake(640,0, ScreenWidth,ScreenHeight)];
[imageview2setImage:[UIImageimageNamed:@"guide3.png"]];
[scrollViewaddSubview:imageview2];
[imageview2release];
UIImageView *imageview3 = [[UIImageViewalloc] initWithFrame:CGRectMake(960,0, ScreenWidth,ScreenHeight)];
[imageview3setImage:[UIImageimageNamed:@"guide4.png"]];
[scrollViewaddSubview:imageview3];
//给最后一张图片设点击事件
imageview3.userInteractionEnabled=YES;
UITapGestureRecognizer *singleTap =[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(firstpressed)];
[imageview3addGestureRecognizer:singleTap];
[singleTaprelease];
[imageview3release];
[self.viewaddSubview:scrollView];
[scrollViewrelease];
}
- (void)firstpressed
{
[selfpresentModalViewController:[[[ViewControlleralloc] init]autorelease] animated:YES];
}
@end