Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems important #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions GMGridView/GMGridView.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
// Copyright (C) 2011 by Gulam Moledina.
//
// Latest code can be found on GitHub: https://github.com/gmoledina/GMGridView
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -29,6 +29,7 @@
#import <UIKit/UIKit.h>
#import "GMGridView-Constants.h"
#import "GMGridViewCell.h"
#import "UIGestureRecognizer+GMGridViewAdditions.h"

@protocol GMGridViewDataSource;
@protocol GMGridViewActionDelegate;
Expand All @@ -44,10 +45,10 @@ typedef enum

typedef enum
{
GMGridViewScrollPositionNone,
GMGridViewScrollPositionTop,
GMGridViewScrollPositionMiddle,
GMGridViewScrollPositionBottom
GMGridViewScrollPositionNone,
GMGridViewScrollPositionTop,
GMGridViewScrollPositionMiddle,
GMGridViewScrollPositionBottom
} GMGridViewScrollPosition;

typedef enum
Expand Down Expand Up @@ -121,7 +122,7 @@ typedef enum
@protocol GMGridViewDataSource <NSObject>

@required
// Populating subview items
// Populating subview items
- (NSInteger)numberOfItemsInGMGridView:(GMGridView *)gridView;
- (CGSize)GMGridView:(GMGridView *)gridView sizeForItemsInInterfaceOrientation:(UIInterfaceOrientation)orientation;
- (GMGridViewCell *)GMGridView:(GMGridView *)gridView cellForItemAtIndex:(NSInteger)index;
Expand Down Expand Up @@ -167,10 +168,11 @@ typedef enum

@optional
// Sorting started/ended - indexes are not specified on purpose (not the right place to update data structure)
- (void)GMGridView:(GMGridView *)gridView didStartMovingCell:(GMGridViewCell *)cell;
- (void)GMGridView:(GMGridView *)gridView didEndMovingCell:(GMGridViewCell *)cell;
- (void)GMGridView:(GMGridView *)gridView didStartMovingCell:(GMGridViewCell *)cell atIndex:(NSInteger)index;
- (void)GMGridView:(GMGridView *)gridView didEndMovingCell:(GMGridViewCell *)cell atIndex:(NSInteger)index;
// Enable/Disable the shaking behavior of an item being moved
- (BOOL)GMGridView:(GMGridView *)gridView shouldAllowShakingBehaviorWhenMovingCell:(GMGridViewCell *)view atIndex:(NSInteger)index;
- (BOOL)GMGridView:(GMGridView *)gridView shouldAllowMovingCell:(GMGridViewCell *)view atIndex:(NSInteger)index;

@end

Expand Down
Loading