1
我真的得到這個惱人的警告:嗯,越來越:可能不迴應 '-presentModalViewController:動畫:'
警告:
'的AppDelegate' 可能不 ':動畫-presentModalViewController' 迴應在此實現文件:
- (IBAction)showInfo:(id)sender {
FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
}
在該行:
自我存在ModalViewController:controller animated:YES];
,這裏是頭文件:
#import <UIKit/UIKit.h>
#import "FlipsideViewController.h"
@interface AppDelegate : NSObject <UIApplicationDelegate, UIScrollViewDelegate, FlipsideViewControllerDelegate> {
UIWindow *window;
UIScrollView *scrollView;
UIPageControl *pageControl;
NSMutableArray *viewControllers;
UIView *flipside;
UIImageView *infoButton;
// To be used when scrolls originate from the UIPageControl
BOOL pageControlUsed;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
@property (nonatomic, retain) IBOutlet UIPageControl *pageControl;
@property (nonatomic, retain) IBOutlet UIView *flipside;
@property (nonatomic, retain) IBOutlet UIImageView *infoButton;
@property (nonatomic, retain) NSMutableArray *viewControllers;
- (IBAction)showInfo:(id)sender;
- (IBAction)changePage:(id)sender;
@end
顯然有一些東西我真的沒有得到,但我會很感激,如果有人可以幫助:)
好吧,這是有道理的,我將不得不修改代碼來從UIViewController調用它。 感謝您的幫助 – 2010-09-02 07:34:10