In iOS development, we will definitely use something like the Welcome interface. You need to turn the page and the following tips dot dot.
In the implementation of iOS, the page turn effect is to use Uiscrollview. And Uipageview just add the following tip dot only.
The following I post detailed implementation is relatively simple:
adview.m//ting3////Created by du Jia Li on 11/17/14.//Copyright (c) 2014 DuPont. All rights reserved.//#import "ADView.h" @interface ADView () <UIScrollViewDelegate> @property (nonatomic, Strong) Uiscrollview *adscrollview; @property (nonatomic, strong) Uipagecontrol *adpagecontrol; @end @implementation ADView-(ID ) initWithFrame: (CGRect) frame Andimagepatharr: (Nsarray *) patharr{if (self = [Super Initwithframe:frame]) { _adscrollview = [[Uiscrollview alloc] Initwithframe:cgrectmake (0, 0, Frame.size.width, frame.size.height)]; _adscrollview.pagingenabled = true; _adscrollview.bounces = false; _adscrollview.delegate = self; _adscrollview.contentsize = Cgsizemake (Frame.size.width * patharr.count, frame.size.height); [Self addsubview:_adscrollview]; for (int i = 0; i < Patharr.count; i++) {Uiimageview * Adimageview = [[Uiimageview alloc] Initwithimage:[ui Image ImagewithcontentsoffIle:patharr[i]]; Adimageview.frame = CGRectMake (frame.size.width * I, 0, frame.size.width, frame.size.height); [_adscrollview Addsubview:adimageview]; } _adpagecontrol = [[Uipagecontrol alloc] Initwithframe:cgrectmake (0, Cgrectgetmaxy (_adscro Llview.frame)-Frame.size.width, 30]; [_adpagecontrol addtarget:self Action: @selector (Pageturn:) forcontrolevents:uicontroleventalleditingevents]; _adpagecontrol.numberofpages = Patharr.count; _adpagecontrol.currentpage = 0; [Self Addsubview:_adpagecontrol]; } return self;} -(void) Pageturn: (Uipagecontrol *) sender{cgsize viewsize = _adscrollview.frame.size; CGRect rect = CGRectMake (sender.currentpage * viewsize.width, 0, Viewsize.width, viewsize.height); [_adscrollview Scrollrecttovisible:rect Animated:yes]; }-(void) scrollviewdidenddecelerating: (Uiscrollview *) scrollview{cgpoint offset = ScrollView.Contentoffset; CGRect bounds = scrollview.frame; _adpagecontrol.currentpage = Offset.x/bounds.size.width; } @end
IOS Uipageview and Uiscrollview