BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!

BAGridView

BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!,
, BAHome, Team, Name
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!

1, function and brief introduction

  • 1, Alipay home squares layout package
  • 2 、 adaptive button position and quantity
  • 3. Customize text, pictures, or two lines of text style
  • 4, custom split line: Show / hide
  • 5, custom segmentation line: color

2, picture example

BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView1
BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView2

3. Install and import sample and source addresses

  • 1, the latest version of pod into [
    ]: BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!:
    pod’BAGridView’
    pod search BAGridView found that if the search out is not the latest version, in the terminal to execute the CD file conversion path command back to desktop, and then execute the pod setup command to update the local spec cache (may take several minutes), then you can search the.
    specific steps: pod setup: initialize pod repo update: update warehouse pod search BAGridView
  • 2 Folder pull: Download demo, BAGridView folder into the project can be,
  • 3, import header file:
    #import, “BAKit_BAGridView.h”,
  • 4, project source address:
    OC version: https://github.com/BAHome/BAGridView

4, BAGridView class structure and demo example

BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!
BAGridView

BAKit_BAGridView.h

#ifndef BAKit_BAGridView_h #define BAKit_BAGridView_h #import "BAGridView.h" #import "BAGridItemModel.h" #import "BAKit_ConfigurationDefine.h" / *! ********************************************************************************* which ************************ update ************************************ ********************************************************************************* welcome to BAHome series of open source code! If there is more, please visit: https://github.com/BAHome project source address: OC version: https://github.com/BAHome/BAButton latest update: 2017-06-20 [<] br> flashback; the latest Version [Version:1.0.0]: < br> < br> update: 1.0.0.1, Alipay home page layout package Jiugongge < 1.0.0.2, br> adaptive button the location and quantity of < br> 1.0.0.3, custom text pictures or two lines of text style < br> 1.0.0.4, custom line: Show / hide < br> 1.0.0.5, <: custom line color; br> * / / * * / BAKit_BAGridView_h #endif

BAGridView.h

#import < UIKit/UIKit.h> @class; BAGridItemModel, BAGridView; / * * BAGridViewTypeImageTitle: - style palace case above is a picture, the following is the text - BAGridViewTypeTitleDesc: are above the title text, fonts, font details below is a small NS_ENUM / typedef (NSUInteger, BAGridViewType) {BAGridViewTypeImageTitle} = 0, BAGridViewTypeTitleDesc; BAGridView @param model BAGridItemModel / * * callback returns @param indexPath indexPath / typedef void (^BAGridViewBlock) (BAGridItemModel *model, NSIndexPath *indexPath); BAGridView @param tempView BAGridView / * * * / typedef callback configuration void (^BAGridView_configurationBlock) (BAGridView *tempView); @interface: BAGridView UIView / * * default grids style: BAGridViewTypeIma GeTitle / @property (nonatomic, assign) BAGridViewType gridViewType; / * * data source: from BAGridItemModel / @property (nonatomic, strong) NSArray < BAGridItemModel *> *dataArray item; / * * * / @property: click callback (nonatomic, copy) BAGridViewBlock ba_gridViewBlock item: @property; / * * * / height (nonatomic, assign) CGFloat ba_gridView_itemHeight; / * *: item each line number item, the default is 4 * @property (nonatomic, assign) NSInteger ba_gridView_rowCount; / * * item:title color, default: BAKit_Color_Black [[UIColor blackColor]] * / @property (nonatomic, strong) UIColor *ba_gridView_titleColor; / * * item:Desc color, default: BAKit_Color_Gray_9 [BAKit_Color_RGB (216, 220, 228 (nonatomic, @property)]. Str Ong UIColor *ba_gridView_titleDescColor item); / * *: line color, default: BAKit_Color_Gray_10 [BAKit_Color_RGB (240, 240, 240)] * / @property (nonatomic, strong) UIColor *ba_gridView_lineColor item; / * *: whether to display the line * @ property (nonatomic, assign, getter=isShowLineView) BOOL showLineView; @param gridViewType @param to create grids style dataArray data @param configurationBlock @param block click event callback callback configuration @return BAGridView * / / * * + fast (instancetype) ba_creatGridViewWithGridViewType: (BAGridViewType) gridViewType dataArray: (NSArray < BAGridItemModel *> *) dataArray configurationBlock: (BAGridView_configurationBlock) config UrationBlock block: (BAGridViewBlock) block; @end

Demo example

/ / sample 1:- (BAGridView *) gridView {if (_gridView! = [BAGridView) {_gridView ba_creatGridViewWithGridViewType:BAGridViewTypeImageTitle dataArray:self.gridDataArray configurationBlock:^ (BAGridView *tempView) {/ / display division line tempView.showLineView = NO; / / item: line color, default: BAKit_Color_Gray_11 [BAKit_Color_RGB (248, 248, 248)] / / tempView.ba_gridView_lineColor = BAKit_Color_Red; / / item: a each line number item, the default is 4 tempView.ba_gridView_rowCount = kGridView_rowCount; / / item: height tempView.ba_gridView_itemHeight = kGridView_itemHeight; / / item:title default color: BAK It_Color_Black [[UIColor] blackColor] / / tempView.ba_gridView_titleColor = BAKit_Color_Black; self.gridView = tempView;} block:^ (BAGridItemModel *model, NSIndexPath *indexPath) {BAKit_ShowAlertWithMsg_ios8 (model.titleString);}]; _gridView.backgroundColor = BAKit_Color_White;}} - (return _gridView; NSMutableArray < BAGridItemModel *> * gridDataArray) {if (! _gridDataArray) {_gridDataArray = @[].mutableCopy; NSArray *imageNameArray @[@ = "tabbar_mainframeHL", "tabbar_mainframeHL", "@ @ tabbar_mainframeHL, @ tabbar_mainframeHL, @" tabbar_mainframeHL "]; NSArray *titleArray = @[@" sweep "," pay "," @ @ @ card "," cashier "@" card "]; for (NSInteger I = 0; I < titleArray.count; i++) {BAGridItemModel *model [BAGridItemModel = new]; model.imageName = imageNameArray[i]; model.titleString = titleArray[i]; [self.gridDataArray addObject:model];}}} / / return _gridDataArray; sample 2:- (BAGridView *) gridView2 {if (_gridView2! = [BAGridView) {_gridView2 (ba_creatGridViewWithGridViewType:BAGridViewTypeTitleDesc dataArray:self.gridDataArray2 configurationBlock:^ BAGridView *tempView) {/ / item: line color, default: BAKit_Color_Gray_11 [BAKit_Color_RGB (248, 248, 248)] tempView. Ba_gridView_lineColor = BAKit_Color_Red; / / item: each line number item, the default is 4 tempView.ba_gridView_rowCount = kGridView_rowCount2; / / item: height tempView.ba_gridView_itemHeight = kGridView_itemHeight2; / / item:title color, default: BAKit_Color_Black [[UIColor blackColor]] tempView.ba_gridView_titleColor = BAKit_Color_Black; / / item:Desc color, default: BAKit_Color_Gray_9 [BAKit_Color_RGB (216, 220, 228)] = tempView.ba_gridView_titleDescColor BAKit_Color_Gray_7; self.gridView2 = tempView;} block:^ (BAGridItemModel *model, NSIndexPath *indexPath BAKit_ShowAlertWithMsg_ios8 (model.ti) { TleString)}]; _gridView2.backgroundColor = [UIColor; yellowColor] return _gridView2;};} - (NSMutableArray < BAGridItemModel *> * gridDataArray2) {if (! _gridDataArray2) {_gridDataArray2 = @[].mutableCopy; titleArray = NSArray * @[@ "200", "20", "@ @ @ 200", "10"]; NSArray *descArray = @[@ "new points total", "total return points", @ @ @ full back unit total "," per unit return points "]; for (NSInteger I = 0; I < titleArray.count; i++) {BAGridItemModel *model [BAGridItemModel = new]; model.desc = descArray[i]; model.titleString = titleArray[i]; [_gridDataArray2 addObject:model] return _gridDataA;}} Rray2;} other examples can download demo to view the source code!

5, update records: [flashback]

Welcome to use [BAHome] series of open source code! For more
requirements, please go to: [https://github.com/BAHome]

The latest update: 2017-06-20 [
] Version: the latest flashback [Version:1.0.0]
update:
1.0.0.1, Alipay home page layout package 1.0.0.2,
squares adaptive button position and number of
1.0.0.3, since the definition of text or pictures of two lines of text style
1.0.0.4, custom line: Show / hide
1.0.0.5, custom line
: color segmentation

6, bug feedback and contact information

1, the development encountered bug, hope that small partners can timely feedback with our BAHome team, we will seriously treat each problem!
2, and later on demand and bug students, remember to git or blog link to us, I directly chain to you there! I hope you will take an active part in the test!
3,
contact QQ group: 479663605 [Note: this group is to pay 2 yuan to the group, friends do not mind!
fraternity QQ:137361770
fraternity micro-blog: BAGridView: Alipay home page Jiugongge layout package, you can customize a variety of styles, custom line features such as color, show / hide everything!

7, development environment and support version

The development uses Xcode Version 8.3.2 (8E2002) and supports all iOS versions in theory. If there are version adaptation problems, please give feedback in time! Thanks for your cooperation!

8, thank you

Thank BAHome team members for their cooperation, and later will launch a series of commonly used UI control package, we have the demand can also be put forward in issue, if reasonable, we will release the new version as soon as possible! Trust and promote the development of
BAHome cannot do without friends, thank you again for your friends support!