#error:崩溃 #worning: /Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLAppDelegate.m:15:15: Unused variable 'window' |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; CYLLoginViewController *viewController = [[CYLLoginViewController alloc] init]; self.window.rootViewController =viewController; [self.window makeKeyAndVisible]; return YES; } |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; MJLoginViewController *login = [[MJLoginViewController alloc] init]; // 显示导航控制器 self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:login]; [self.window makeKeyAndVisible]; return YES; } |
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; CYLLoginViewController *viewController = [[CYLLoginViewController alloc] init]; self.window.rootViewController.view =viewController.view; [self.window makeKeyAndVisible]; return YES; } |
||||
2013-12-10 19:24:11.355 MainStory[4044:70b] Cannot find executable for CFBundle 0x8ad60b0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded) #error#解决方案:并没有任何错误异常,只是显示以下调试信息Cannot find executable for CFBundle 0x8ad60b0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle |
程序时,并不会引起异常,但崩溃是正确导致无法正常显示错误调试信息 | |||
2013-12-10 19:29:49.080 01-导航实例-QQ空间[4110:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/chenyilong/Library/Application Support/iPhone Simulator/6.1/Applications/99760B7C-D678-4A36-A717-6DB63960A056/01-导航实例-QQ空间.app> (loaded)' with name 'Main'' *** First throw call stack: (0x1501012 0x10cee7e 0x1500deb 0x457ef9 0x4598da 0x23b68b 0x23b9a2 0x23a876 0x24bcb5 0x24cbeb 0x23e698 0x2527df9 0x2527ad0 0x1476bf5 0x1476962 0x14a7bb6 0x14a6f44 0x14a6e1b 0x23a17a 0x23bffc 0x299d 0x1b0870d) libc++abi.dylib: terminate called throwing an exception (lldb) |
建工程时勾选storyboard,但删除storyboard,打算使用xib,忘记删除MainInterface |
|||
self.navigationItem.rightBarButtonItem =[[UINavigationItem alloc] initWithTitle:@"关于"]; | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"关于" style:UIBarButtonItemStyleBordered target:self action:@selector(jump2about)]; | |||
-(void)Edit2home { CYLHomeViewController *home = [[CYLHomeViewController alloc] init]; [self.navigationController pushViewController:home animated:YES]; } - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"编辑" style:UIBarButtonItemStyleBordered target:self action:@selector(Edit2home)]; CYLHomeViewController *home = [[CYLHomeViewController alloc] init]; // nameHome. _nameEdit.text = home.nameHome.text; // Do any additional setup after loading the view from its nib. } |
||||
/Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLHomeViewController.m:33:37: Receiver 'CYLEditViewController' for class message is a forward declaration /Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLHomeViewController.m:33:36: Receiver type 'CYLEditViewController' for instance message is a forward declaration |
#import <UIKit/UIKit.h> @class CYLEditViewController; //#import "CYLEditViewController.h" @interface CYLHomeViewController : UIViewController |
|||
// CYLPerson.m #import "CYLPerson.h" @implementation CYLPerson //-(id)initWithId -(void)initWithId:(id)someOne { self = [super init]; if (nil != self) { self.name = someOne.name; } } |
||||
/Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLPerson.m:20:9: Definition of 'struct objc_class' must be imported from module 'ObjectiveC.runtime' before it is required /Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLPerson.m:20:9: Definition of 'struct objc_class' must be imported from module 'ObjectiveC.runtime' before it is required |
+(id)personWithId:(NSString *)someOne { self.name =someOne; } |
|||
/Users/chenyilong/Dropbox/Xcode/01-导航实例-QQ空间/01-导航实例-QQ空间/CYLPerson.m:20:9: Member reference base type 'Class' is not a structure or union |
+(id)personWithId:(NSString *)someOne { self->name =someOne; } |
|||
#pragma mark ---代理方法 -(id)editViewController:(CYLPerson *)p{ // CYLPerson *person = [CYLPerson personWithId:self.nameHome.text]; // CYLPerson *person = [[CYLPerson alloc] init]; NSLog(@"代理"); self.nameHome.text = p.name; return self; } //Edit中的方法 -(void)save { CYLPerson *per = [CYLPerson personWithId:self.nameEdit.text]; [_delegate editViewController:per]; // CYLHomeViewController *home = [[CYLEditViewController alloc] init]; [self.navigationController popViewControllerAnimated:YES];} |
#pragma mark - MJEditViewController代理方法 - (void)editViewController:(MJEditViewController *)edit didSaveWithPerson:(MJPerson *)person { // 1.显示名称 _nameLabel.text = person.name; // 2.显示简介 _introView.text = person.intro; } |