GithubHelp home page GithubHelp logo

sesedezhu / chggridview Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14.83 MB

项目主要提供ios下的应用启动的导航、广告轮播、左右滑动的菜单、以及tab实现

License: Apache License 2.0

Ruby 1.26% Objective-C 98.74%

chggridview's Introduction

#CHGGridView 完成1.0版 功能包括 应用启动导航、广告模式、菜单模式(类似大众点评)、tab模式 输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明输入图片说明

使用说明 

广告模式 
self.adView = [[CHGAdView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 200)];
_adView.data = @[@"http://ww1.sinaimg.cn/large/7efb7362jw1e3rgypjtzvj.jpg",
@"http://img.3366.com/fileupload/img/commmanage/151/6780_1.jpg",
@"http://pic1.nipic.com/2008-11-05/2008115214135913_2.jpg"];//[self simulationData];
_adView.isCycleShow = YES;//是否循环显示
_adView.isTimerShow = YES;//是否启用定时切换
_adView.isShowPageControll = YES;//是否显示pageControll
_adView.dataSource = self;
[_adView.chgMenu.gridView registerNibName:@"AdCell" forCellReuseIdentifier:@"AdCell"];
[_adView reloadData];
[self.view addSubview:_adView];


页面启动导航模式 (CHGAdView 导航模式,此模式只需要将isCycleShow、isTimerShow的属性设置为“NO”即可)
self.adView = [[CHGAdView alloc] initWithFrame:[UIScreen mainScreen].bounds];
_adView.data = @[@"http://ww1.sinaimg.cn/large/7efb7362jw1e3rgypjtzvj.jpg",
@"http://img.3366.com/fileupload/img/commmanage/151/6780_1.jpg",
@"http://pic1.nipic.com/2008-11-05/2008115214135913_2.jpg"];
_adView.isCycleShow = NO;//是否循环显示
_adView.isTimerShow = NO;//是否启用定时切换
_adView.isShowPageControll = YES;//是否显示pageControll
_adView.dataSource = self;
[_adView.chgMenu.gridView registerNibName:@"NavCell" forCellReuseIdentifier:@"NavCell"];
[self.view addSubview:_adView];


菜单模式(类似大众点评) 
self.menu = [[CHGMenu alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 660)];
_menu.items = [self simulationData];
_menu.showPageControl = YES;//是否显示pageControll
_menu.gridViewDatasource = self;
_menu.gridViewDelegate = self;
[_menu.gridView registerNibName:@"MenuItemCell" forCellReuseIdentifier:@"MenuItemCell"];
[_menu.gridView registerNibName:@"AdCell" forCellReuseIdentifier:@"AdCell"];


tab切换 
self.tabPage = [[CHGTabPage alloc] initWithFrame:CGRectMake(0, _userVCMode ? 20 : 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - (_userVCMode ? 20 : 64))];
_tabPage.tabPageDataSource = self;
_tabPage.gridViewDelegate = self;
_tabPage.items = [self simulationData];
_tabPage.selectedColor = [UIColor greenColor];
_tabPage.normalColor = [UIColor grayColor];
_tabPage.tabViewLoca = locationTop;//在顶部显示按钮区域
_tabPage.itemBtnCellLocation = CHGTabViewItemBtnCellLocationBottom;
_tabPage.slideIndicatorColor = [UIColor redColor];
_tabPage.useVCMode = _userVCMode;//是否定义左侧和右侧的view
[_tabPage.gridView registerNibName:@"TableViewCell" forCellReuseIdentifier:@"TableViewCell"];
[self.view addSubview:_tabPage];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.