IOS image carousel and start guide Interface

Source: Internet
Author: User

I used code4app.com to change his implementation method and use his image segmentation for reference in the starting guide interface.
Image carousel is a carousel I previously wrote. I set a timer to automatically set the next one.

Share it now


This is the guide Interface Usage

[Cpp]
-(BOOL) application :( UIApplication *) application didfinishlaunchingwitexceptions :( NSDictionary *) launchOptions
{
Self. window = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen] bounds];
Self. viewController = [[LKViewController alloc] initWithNibName: @ "LKViewController" bundle: nil];

NSMutableArray * dataArray = [NSMutableArray array];
For (int I = 1; I <= 5; I ++ ){
// Complete path for loading Images
[DataArray addObject: [[NSBundle mainBundle] pathForResource: [NSString stringWithFormat: @ "welcome-% d", I] ofType: @ "jpg"];
}
// How can I determine whether it is the first time I enter a file? How can I determine fields?
LKWelcomeView * welcome = [[LKWelcomeView alloc] initWithFrame: CGRectMake (0, 20, self. window. frame. size. width, self. window. frame. size. height-20) andPathArray: dataArray];

[Self. window addSubview: welcome];
Welcome. endEvent = ^ (){
// When you want to enter the main program
[Self. window insertSubview: self. viewController. view atIndex: 0];
};
 
[Self. window makeKeyAndVisible];
Return YES;
}

This is a simple method of carousel.

[Cpp] www.2cto.com
-(Void) viewDidLoad
{
NSMutableArray * pagearray = [NSMutableArray arrayWithCapacity: 5];
For (int I = 1; I <= 5; I ++ ){
[Pagearray addObject: [[NSBundle mainBundle] pathForResource: [NSString stringWithFormat: @ "page _ % d", I] ofType: @ "jpg"];
}

LKPageView * page = [[LKPageView alloc] initWithPathStringArray: pagearray andFrame: CGRectMake (0, 50,320,200)];
[Self. view addSubview: page];
[Super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.