Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use two lines of IOS code to realize the carousel graph

Shulou Source: shulou.com Published: 2022-06-03 09:30:41 11月15日 Update

Editor to share with you how to use two lines of IOS code to achieve round broadcast map, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Step 1: import KJBannerView components using cocopods

# import "KJBannerView.h"

Step 2: add an agent to the m file

/ / and define the component @ property (nonatomic,strong) KJBannerView * banner2

Step 3: this is the only step to achieve.

-(void) initData {KJBannerView * banner2 = [[KJBannerView alloc] initWithFrame:CGRectMake (0150, self.view.frame.size.width, self.view.frame.size.width*0.4)]; self.banner2 = banner2; banner2.imgCornerRadius = 15; banner2.autoScrollTimeInterval = 2; banner2.isZoom = YES; banner2.itemSpace =-10; banner2.itemWidth = self.view.frame.size.width-70; banner2.delegate = self; banner2.isLocalityImage = YES Banner2.imageDatas = @ [@ "1", @ "2", @ "3", @ "2", @ "3", @ "1", @ "2", @ "1", @ "3", @ "1",]; [self.view addSubview:banner2];}

The above is all the content of the article "how to use two lines of IOS code to implement a broadcast map". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Articles code content components not much most documents more knowledge industry information information channels channels agents references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Docker Shulou Technology Redmi MySQL