0
我已经开始学习iphone应用程序开发。但是,当我构建并运行该项目时,模拟器将以新的应用程序图标打开。当我点击新的应用程序图标时......没有任何反应。Iphone SDK 4.0 - >>模拟器只是坐在那里,并没有加载ap
- >>模拟器只是坐在那里,并不会加载该应用程序
任何帮助将不胜感激。
Marty
我已经开始学习iphone应用程序开发。但是,当我构建并运行该项目时,模拟器将以新的应用程序图标打开。当我点击新的应用程序图标时......没有任何反应。Iphone SDK 4.0 - >>模拟器只是坐在那里,并没有加载ap
- >>模拟器只是坐在那里,并不会加载该应用程序
任何帮助将不胜感激。
Marty
其实这不是我的代码。我从我正在学习的书中得到它。那就是: -
#import "basicViewController.h"
@implementation basicViewController
@synthesize txtName;
@synthesize lblMessage;
- (IBAction) doSomething;
{
NSString *msg =[[NSString alloc] initWithFormat:@"Hello, %@", txtName.text];
[lblMessage setText:msg];
[msg release];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
//------------------------
#import <UIKit/UIKit.h>
@interface basicViewController : UIViewController {
IBOutlet UITextField *txtName;
IBOutlet UILabel *lblMessage;
}
@property (nonatomic, retain) IBOutlet UITextField *txtName;
@property (nonatomic, retain) IBOutlet UILabel *lblMessage;
- (IBAction) doSomething;
@end
什么也没有发生如模拟器只是坐在那里,不加载应用程序,或者什么也没有发生,因为程序在被打开立即崩溃?如果是后者,则可能是程序中有错误导致它在启动时崩溃。 – cubic1271 2010-08-21 00:48:51
你是说如果你在模拟器上关闭应用程序并尝试重新打开它,它将不会重新打开? – iwasrobbed 2010-08-21 00:49:41
是的模拟器只是坐在那里,并没有加载应用程序 – marty 2010-08-21 00:55:58