1
我有未完全執行警告我實現頁面上(同樣的功能是在right.m文件):未完全執行在左側
left.m文件
#import "left.h"
#import "shareL.h"
@interface left()
@end
@implementation left // Incomplete implementation
- (IBAction)shareL {
shareL *screen = [[shareL alloc] initWithNibName:nil bundle :nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
}
- (IBAction)backButton {
[self dismissModalViewControllerAnimated:YES];
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
爲何未完全執行?在右側,我有相同的功能和一切都OK。
方法你應該分享'left.h',看看你聲明有什麼方法。另外,如果你展開編譯錯誤,它會告訴你它正在執行的方法的名字,但從來沒有找到。 – Rob
正如@Rob上面所說,沒有標題,很難知道你錯過了什麼。另外 - 這與你缺少的方法實現無關 - 你的Objective-C類名「left」是非常規的。請參閱Apple類[命名標準](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingBasics.html#//apple_ref/doc/uid/20001281-1002242-BBCIJGDB )按照慣例,類名是名詞,並以一個唯一的大寫前綴開始。 – FluffulousChimp