运行启动页

- (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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值