Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Created constants headerfile

  • Loading branch information...
commit 56c40088f32aabefe1d5b8e21b696b968d2d46f9 1 parent cd8f646
Gulam Moledina authored
6 GMGridView.xcodeproj/project.pbxproj
View
@@ -53,6 +53,7 @@
169AE3771460E1B300C0CBCD /* OptionsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OptionsViewController.m; path = GMGridView/OptionsViewController.m; sourceTree = SOURCE_ROOT; };
16A0D02E145342F8004D7BBC /* GMGridViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMGridViewCell.h; path = GMGridView/API/GMGridViewCell.h; sourceTree = SOURCE_ROOT; };
16A0D02F145342F8004D7BBC /* GMGridViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GMGridViewCell.m; path = GMGridView/API/GMGridViewCell.m; sourceTree = SOURCE_ROOT; };
+ 16B3E6FA1499AB0000318848 /* GMGridView-Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "GMGridView-Constants.h"; path = "GMGridView/API/GMGridView-Constants.h"; sourceTree = SOURCE_ROOT; };
16DF1A6C145E3456006AA43C /* GMGridViewLayoutStrategies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMGridViewLayoutStrategies.h; path = GMGridView/API/GMGridViewLayoutStrategies.h; sourceTree = SOURCE_ROOT; };
16DF1A6D145E3456006AA43C /* GMGridViewLayoutStrategies.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GMGridViewLayoutStrategies.m; path = GMGridView/API/GMGridViewLayoutStrategies.m; sourceTree = SOURCE_ROOT; };
16DF1A6F145E3460006AA43C /* UIGestureRecognizer+GMGridViewAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIGestureRecognizer+GMGridViewAdditions.h"; path = "GMGridView/API/UIGestureRecognizer+GMGridViewAdditions.h"; sourceTree = SOURCE_ROOT; };
@@ -164,6 +165,7 @@
16961E1C1470A61C00DA708A /* Implementation Logic */ = {
isa = PBXGroup;
children = (
+ 16B3E6FA1499AB0000318848 /* GMGridView-Constants.h */,
1691D7AD1442D02C00F472BF /* GMGridView.m */,
16961E1A14705B9B00DA708A /* GMGridViewCell+Extended.h */,
16A0D02F145342F8004D7BBC /* GMGridViewCell.m */,
@@ -277,7 +279,7 @@
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
@@ -296,7 +298,7 @@
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
62 GMGridView/API/GMGridView-Constants.h
View
@@ -0,0 +1,62 @@
+//
+// GMGridView-Constants.h
+// GMGridView
+//
+// Created by Gulam Moledina on 11-12-14.
+// Copyright (c) 2011 GMoledina.ca. All rights reserved.
+//
+// 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
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+
+#ifndef GMGridView_GMGridView_Constants_h
+#define GMGridView_GMGridView_Constants_h
+
+
+//
+// ARC on iOS 4 and 5
+//
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0
+
+#define gm_weak weak
+#define __gm_weak __weak
+#define gm_nil(x)
+
+#else
+
+#define gm_weak unsafe_unretained
+#define __gm_weak __unsafe_unretained
+#define gm_nil(x) x = nil
+
+#endif
+
+
+//
+// Code specific
+//
+
+#define GMGV_INVALID_POSITION -1
+
+
+
+
+#endif
13 GMGridView/API/GMGridView.h
View
@@ -27,18 +27,7 @@
//
#import <UIKit/UIKit.h>
-
-// use special weak keyword
-#if !defined gm_weak && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0
-#define gm_weak weak
-#define __gm_weak __weak
-#define gm_nil(x)
-#elif !defined gm_weak
-#define gm_weak unsafe_unretained
-#define __gm_weak __unsafe_unretained
-#define gm_nil(x) x = nil
-#endif
-
+#import "GMGridView-Constants.h"
#import "GMGridViewCell.h"
@protocol GMGridViewDataSource;
2  GMGridView/API/GMGridView.m
View
@@ -1043,7 +1043,7 @@ - (GMGridViewCell *)newItemSubViewForPosition:(NSInteger)position
cell.editing = self.editing;
__gm_weak GMGridView *weakSelf = self;
-
+
cell.deleteBlock = ^(GMGridViewCell *cell)
{
NSInteger index = [weakSelf positionForItemSubview:cell];
1  GMGridView/API/GMGridViewCell+Extended.h
View
@@ -27,6 +27,7 @@
//
#import <Foundation/Foundation.h>
+#import "GMGridView-Constants.h"
#import "GMGridView.h"
#import "GMGridViewCell.h"
2  GMGridView/API/GMGridViewCell.h
View
@@ -27,7 +27,7 @@
//
#import <UIKit/UIKit.h>
-
+#import "GMGridView-Constants.h"
@interface GMGridViewCell : UIView
{
3  GMGridView/API/GMGridViewLayoutStrategies.h
View
@@ -27,8 +27,7 @@
//
#import <Foundation/Foundation.h>
-
-#define GMGV_INVALID_POSITION -1
+#import "GMGridView-Constants.h"
@protocol GMGridViewLayoutStrategy;
1  GMGridView/API/UIGestureRecognizer+GMGridViewAdditions.h
View
@@ -27,6 +27,7 @@
//
#import <UIKit/UIKit.h>
+#import "GMGridView-Constants.h"
@interface UIGestureRecognizer (GMGridViewAdditions)
1  GMGridView/API/UIView+GMGridViewAdditions.h
View
@@ -27,6 +27,7 @@
//
#import <UIKit/UIKit.h>
+#import "GMGridView-Constants.h"
@interface UIView (GMGridViewAdditions)
16 GMGridView/Demo1ViewController.m
View
@@ -86,9 +86,15 @@ - (id)init
}
+ NSLog(@"Init");
return self;
}
+- (void)dealloc
+{
+ NSLog(@"Dealloc");
+}
+
//////////////////////////////////////////////////////////////
#pragma mark controller events
//////////////////////////////////////////////////////////////
@@ -136,14 +142,24 @@ - (void)loadView
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(optionsDoneAction)];
optionsController.navigationItem.rightBarButtonItem = doneButton;
}
+
+ NSLog(@"loadview");
}
- (void)viewDidLoad
{
[super viewDidLoad];
_gmGridView.mainSuperView = self.navigationController.view; //[UIApplication sharedApplication].keyWindow.rootViewController.view;
+ NSLog(@"Viewdidload");
}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ _gmGridView = nil;
+ NSLog(@"View did unload");
+}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
Please sign in to comment.
Something went wrong with that request. Please try again.