forked from AlanQuatermain/AQGridView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAQGridView+Deprecated.m
More file actions
47 lines (28 loc) · 826 Bytes
/
AQGridView+Deprecated.m
File metadata and controls
47 lines (28 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// AQGridView+Deprecated.m
// AQGridView
//
// Created by Evadne Wu on 7/23/12.
// Copyright (c) 2012 AQGridView. All rights reserved.
//
#import "AQGridView+Deprecated.h"
@implementation AQGridView (Deprecated)
- (BOOL) allowsSelection {
return [self selectable];
}
- (void) setAllowsSelection:(BOOL)allowsSelection {
[self setSelectable:allowsSelection];
}
- (NSUInteger) indexOfSelectedItem {
NSIndexSet *indexes = [self selectionIndexes];
if (![indexes count])
return NSNotFound;
return [indexes firstIndex];
}
- (BOOL) clipsContentWidthToBounds {
return (self.layoutDirection == AQGridViewLayoutDirectionVertical);
}
- (void) setClipsContentWidthToBounds:(BOOL)value {
self.layoutDirection = (value ? AQGridViewLayoutDirectionVertical : AQGridViewLayoutDirectionHorizontal);
}
@end