xcode进行编程时可以运行。但加了语句后,运行也通过,模拟器会黑屏。
解决方案 »
- 分享本人开发的首个个人应用【快易博】 新版出来啦,散分~
- IOS开发学习笔记
- 新手请问一个关于IPAD中如果做一个应用图标打开网页的问题?
- 去融信恒通的笔试题,求解答,大家一起讨论下
- IOS上能否开发后台服务程序
- 求助:我公司开发一项产品,iphone通过蓝牙4.0操控第三方设备
- 请教关于应用内付费, 消耗品服务器如何校验
- NSMutableData接收完数据后,访问异常,大神指点!
- x-code 5.1 zxing使用的问题
- ios 录音格式问题
- UIView调用addSubview后怎么立即显示??
- 使用vm 8.0虚拟机 装 Mac.OS.X.10.6.3系统时,在跳转到安装界面时,vm虚拟机出现如下故障
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
#import "bE1ViewController.h"
@implementation bE1ViewController
//@implementation buttonExampleViewController
@synthesize myLabel;
-(void) tapA:(id)sender {
myLabel.text = @"我按了 A 按钮";
}
-(void) tapB:(id)sender {
myLabel.text = @"我按了 B 按钮";
}
@end
//#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>@interface bE1ViewController : UIViewController{
IBOutlet UILabel *myLabel; }
@property (retain, nonatomic) UILabel *myLabel;
-(IBAction) tapA:(id)sender;
-(IBAction) tapB:(id)sender;
@end
是否有指定首先显示的view:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}如果你使用storyboard,检查是否指定了入口viewcontroller,即 initial view controller