-
Notifications
You must be signed in to change notification settings - Fork 156
Description
-
I create an UIViewController instance in AppDelegate.m
-
In viewDidLoad of the UIViewController, create an instance of AFOpenFlowView,here is the code
AFOpenFlowView *af = [[AFOpenFlowView alloc] initWithFrame:CGRectMake(10,20,300,400)];
NSString *imageName;
for (int i=0; i < 10; i++) {
imageName = [[NSString alloc] initWithFormat:@"%d.jpg", i];
[af setImage:[UIImage imageNamed:imageName] forIndex:i];
[imageName release];}
[af setNumberOfImages:10];[self.view addSubView:af];
That this point , if I run the code, Cover flow work fines except delegate method
And the problem comes, no matter use [af setViewDelegate:self] or [af setViewDelegate:(AFOpenFlowView *)self], my app will crash after switch a Cover
Any idea how should I set the delegate properly?
Thank you guys!