views:

39

answers:

1

Hi

I'm trying to make use of FlowCover -> http://www.chaosinmotion.com/flowcover.m but it is not working.

This is my interface class:

#import <UIKit/UIKit.h>
#import "FlowCoverView.h"

@interface TesterCoverFlowViewController : UIViewController <FlowCoverViewDelegate> {

}

- (IBAction)done:(id)sender;

@end

This is my implementation class:

#import "TesterCoverFlowViewController.h"

@implementation TesterCoverFlowViewController

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
    return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
   (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}


- (void)didReceiveMemoryWarning 
{
    [super didReceiveMemoryWarning];
}


- (void)dealloc 
{
    [super dealloc];
}


- (IBAction)done:(id)sender
{
 [[self parentViewController] dismissModalViewControllerAnimated:YES];
}

/************************************************************************/
/*                  */
/* FlowCover Callbacks             */
/*                  */
/************************************************************************/

- (int)flowCoverNumberImages:(FlowCoverView *)view
{
 return 64;
}

- (UIImage *)flowCover:(FlowCoverView *)view cover:(int)image
{
 switch (image % 6) {
  case 0:
  default:
   return [UIImage imageNamed:@"a.png"];
  case 1:
   return [UIImage imageNamed:@"b.png"];
  case 2:
   return [UIImage imageNamed:@"c.png"];
  case 3:
   return [UIImage imageNamed:@"x.png"];
  case 4:
   return [UIImage imageNamed:@"y.png"];
  case 5:
   return [UIImage imageNamed:@"z.png"];
 }
}

- (void)flowCover:(FlowCoverView *)view didSelect:(int)image
{
 NSLog(@"Selected Index %d",image);
}


@end

Most of the code is taken from the site.

Do I need to do anything to the interface? Because nothing appears! no errors, I just don't see any coverflow (or flowcover).

Thanks

A: 

If you are not seeing any errors than it is more than likely a missing delegate or the view is not being presented.

Are you showing that view controller with something like presentModalViewController?

Did you assign the TesterCoverFlowViewController class as the delegate of the FlowCoverView?

Cory Powers
The project is a view controller project so that stuff should be created automatically. And the view is definitely appearing since when i change its colour , this change is apparently when i run the application but hte coverflow doesnt show :S
Lily
Are your delegate methods being called?
Cory Powers