Skip to content

This is a custom view,which is divided into a lot of small grid.You can select/cancel area use gesture.

Notifications You must be signed in to change notification settings

crmo/MDAreaView

Repository files navigation

Installation

Copy the folder 'MDAreaView' to your project,then you can use it. #Usage You can find a demo in ViewController. ###Create a MDAreaView

// Init MDAreaView with frame,background image,number of rows and columns.
MDAreaView *areaSelectView = [MDAreaView MDAreaViewWithFram:CGRectMake(20, 60, 300, 400)
                                            backgroundImage:[UIImage imageNamed:@"testPic"]
                                                        row:20
                                                     column:20];
// Set Delegate
areaSelectView.delegate = self;

###Delegate When you change the select view,this delegate will be called.You can get seleted area from areaArray.The array is a Double Dimensional Array(the index are row number and column number) that storage the area`s state,selected(1) or not selected(0).

- (void)MDAreaViewDelegate:(MDAreaView *)mdAreaView areaArray:(NSArray *)array {
    // Do something.
    NSLog(@"Select View:%@", array);
}

Demo

About

This is a custom view,which is divided into a lot of small grid.You can select/cancel area use gesture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published