ios app banner圖、廣告位圖片、自動翻頁:ICPageView
ICPageView
用法
使用和tableView使用方法類似
//創建PageView ICPageView *pageView = [[ICPageView alloc]init]; pageView.frame = CGRectMake(0, 20, self.view.frame.size.width, 200); //設置代理和數據源 pageView.delegate = self; pageView.dataSource = self; [self.view addSubview:pageView];
代理方法
pragma mark - ICPageViewDataSource
-(NSInteger)numberOfPageView { return _images.count; }
-(id)imageItemForPageViewAtIndex:(NSInteger)index { return _images[index]; }
pragma mark - ICPageViewDelegate
-(void)pageViewDidScrollTOIndex:(NSInteger)index { NSLog(@"pageViewDidScrollTOIndex %ld",index); }
-(void)pageViewDidTapIndex:(NSInteger)index { NSLog(@"pageViewDidTapIndex %ld",index); }
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!