Permalink
Browse files

Fixing NSRangeException in the demo

  • Loading branch information...
1 parent 4238fa0 commit c2c65aa7df6813bc7ee7f57f28404490606ae602 Romain Goyet committed May 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 Demo/Classes/LDMasterViewController.m
@@ -55,7 +55,10 @@ - (IBAction)pickTransform:(id)sender {
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
ADLivelyTableView * livelyTableView = (ADLivelyTableView *)self.tableView;
NSArray * transforms = [NSArray arrayWithObjects:ADLivelyTransformFan, ADLivelyTransformCurl, ADLivelyTransformFade, ADLivelyTransformHelix, ADLivelyTransformWave, nil];
- livelyTableView.initialCellTransformBlock = [transforms objectAtIndex:buttonIndex];
+
+ if (buttonIndex < [transforms count]) {
+ livelyTableView.initialCellTransformBlock = [transforms objectAtIndex:buttonIndex];
+ }
}
#pragma mark - UITableViewDataSource

0 comments on commit c2c65aa

Please sign in to comment.