forked from michaeltyson/TPKeyboardAvoiding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TPKACollectionViewController.m
38 lines (26 loc) · 1.09 KB
/
TPKACollectionViewController.m
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
//
// TPKACollectionViewController.m
// TPKeyboardAvoidingSample
//
// Created by Michael Tyson on 26/06/2015.
// Copyright (c) 2015 A Tasty Pixel. All rights reserved.
//
#import "TPKACollectionViewController.h"
@implementation TPKACollectionViewController
static NSString * const reuseIdentifier = @"Cell";
#pragma mark Collection view data source
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return 30;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
TPKACollectionViewControllerCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
cell.label.text = [NSString stringWithFormat:@"Label %d", (int)indexPath.row];
cell.textField.placeholder = [NSString stringWithFormat:@"Field %d", (int)indexPath.row];
return cell;
}
@end
@implementation TPKACollectionViewControllerCell
@end