i changed my iphone application first screen because i want to come a screen and i will click a button before going main works and screens. i change my appdelegate code for this;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
LoadingViewController *m_view = [[[LoadingViewController alloc]initWithNibName:@"LoadingViewController" bundle:nil] autorelease];
m_view.window = window;
[self.window addSubview:m_view.view];
[self.window makeKeyAndVisible];
// Override point for customization after app launch
//[window addSubview:viewController.view];
//[window makeKeyAndVisible];
}
and i create a viewcontroller class;
h file;
#import <UIKit/UIKit.h>
@interface LoadingViewController : UIViewController {
UIWindow *window;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
- (IBAction)startButtonClick:(id)sender;
- (IBAction)favoriButtonClick:(id)sender;
@end
and .m file;
- (IBAction)startButtonClick:(id)sender {
ScrollViewWithPagingViewController *yellowController = [[ScrollViewWithPagingViewController alloc]initWithNibName:@"ScrollViewWithPagingViewController" bundle:nil];
[self presentModalViewController:yellowController animated:YES];
[yellowController release];
}
but when i click the button, didnt come this click action. i get an error before like this;

please help me, i dont understand what is wrong?
—–**********************************************—-
i resolved it !
change this code;
LoadingViewController *m_view = [[[LoadingViewController alloc]initWithNibName:@"LoadingViewController" bundle:nil] autorelease];
i delete autorelease;
LoadingViewController *m_view = [[LoadingViewController alloc]initWithNibName:@"LoadingViewController" bundle:nil];
Looks like your issue might be related to how you are managing the window. You should only need to make one key and visible and you should not have to include the window in you view controller (unless you are doing some other special thing in the controller). I’d leave te default window behavior and just add your controller’s view as a sub view.