Untitled.gif
把指导页图片传入guideImages中
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSArray* guideImages = @[@"welcomePage_1",@"welcomePage_2",@"welcomePage_3"]; AppInstructionView* guide = [[AppInstructionView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)]; guide.guideImages = guideImages; [guide rewritePageControl]; [self.window.rootViewController.view addSubview:guide]; return YES;}如果小圆点不符合需求则在下面修改
#pragma mark - 重写pageControl方法-(void)rewritePageControl{ _pc = [[CHPageControl alloc]initWithFrame:CGRectMake(_pageSize.width * 0.5, _pageSize.height - 50, 0,0) currentColor:COLOR(72.0, 160.0, 220.0, 1) nextColor:COLOR(99.0, 99.0, 99.0, 1) size:8]; [_pc setBackgroundColor:[UIColor clearColor]]; _pc.userInteractionEnabled=NO; [_pc setCurrentPage:0]; [_pc setNumberOfPages:_guideImages.count]; [self addSubview:_pc];}以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。