Iphone SDK 4.0 - >>模拟器只是坐在那里,并没有加载ap

时间:2010-08-21 00:37:30

标签: iphone xcode operating-system ios4

我已经开始学习iphone应用开发了。但是,当我构建并运行项目时,模拟器将打开新的应用程序图标。当我点击新的应用程序图标时......没有任何反应。

- >>模拟器只是坐在那里,不加载应用程序

任何帮助将不胜感激。

玛蒂

1 个答案:

答案 0 :(得分:0)

实际上这不是我的代码。我是从我正在研究的书中得到的。这是: -

#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