gmoledina / GMGridView

A performant Grid-View for iOS (iPhone/iPad) that allows sorting of views with gestures (the user can move the items with his finger to sort them) and pinching/rotating/panning gestures allow the user to play with the view and toggle from the cellview to a fullsize display.
MIT License
2.3k stars 512 forks source link

How do I use initwithframe:reuseIdentifier? #139

Open zakdances opened 12 years ago

zakdances commented 12 years ago

Previously, I was using

if (cell == nil) {

  cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
          reuseIdentifier:CellIdentifier];

 }

But now that I'm using GMGrid, there doesn't seem to be an equivalent method. How do I create a cell with a particular identifier?

exalted commented 11 years ago

A quick look at GMGridView.h pops out:

// Reusable cells
- (GMGridViewCell *)dequeueReusableCell;                              // Should be called in GMGridView:cellForItemAtIndex: to reuse a cell
- (GMGridViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier;