我正在意識到什麼新手我仍然與這個問題我有。我正試圖在我正在進行的一個項目中展示一個模式窗口,但它並未出現。然後我的解決方案是創建一個絕對的基本項目,並讓它在那裏工作,所以我會清楚地瞭解我的問題,但我不能甚至這個工作:(presentModalViewController沒有出現在'簡單'應用
我添加一個ViewController到applicationDidFinishLaunching的MainWindow。在這種ViewControllers廈門國際銀行,我有一個按鈕的ViewController具有以下標題:
#import <UIKit/UIKit.h>
#import "ModalView.h"
@interface ViewBasedViewController : UIViewController {
ModalView *modalView;
}
- (IBAction)dooooIt :(id)sender;
@property (nonatomic, retain, readonly) ModalView *modalView;
@end
和方法:
#import "ViewBasedViewController.h"
@implementation ViewBasedViewController
@synthesize modalView;
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)viewDidUnload {
}
- (void)dealloc {
[super dealloc];
[modalView release];
}
- (ModalView *)modalView {
if (modalView == nil) {
modalView = [[ModalView alloc] initWithNibName:@"ModalView" bundle:nil];
}
return modalView;
}
- (IBAction)dooooIt :(id)sender {
[self.navigationController presentModalViewController:modalView animated:YES];
}
@end
我顯然失去了一些東西很簡單,我相信它在我的耳朵之間這個階段:)
有沒有人想把一個可憐的傢伙擺脫他的痛苦?
非常感謝
克里斯
非常感謝,但是,它是 - !其實我有配音者在presentModalViewController消息打破確保線路正在調用。 – Chris 2010-01-08 17:11:39
dubber =調試器! – Chris 2010-01-08 17:12:17