我無法連接到文件的所有者XIB。應用程序類型是通用的。在「引用插座」中的文件所有者中,只有「新引用插座」,而「引用插座集合」下只有「新引用插座集合」。不可能將UIImageView的IBOutlet連接到xib。在文件的所有者中,儘管我綜合了UIImageView的Outlet,但它並沒有出現。這是代碼:在文件的所有者中沒有出現插座
在RootViewController.h
#import <UIKit/UIKit.h>
@interface RootViewController : UIViewController <UIGestureRecognizerDelegate>{
}
@property (nonatomic, copy) IBOutlet UIImageView *imageView;
@property (nonatomic, assign)BOOL fromRootViewController;
- (void)handleTap:(UITapGestureRecognizer *)recognizer;
@end
在RootViewController.m
@interface RootViewController()
@end
@implementation RootViewController
@synthesize imageView;
@synthesize fromRootViewController;
在RootViewController_iPhone.xib和RootViewController_iPad.xib don'y出現的UIImageView的出路。
當我運行應用程序,這是一個錯誤:
NSInternalInconsistencyException。無法加載套件中的NIB:NSBundle
我該怎麼辦?在此先感謝
什麼類代表文件所有者?一個'UIViewController'類或'RootViewController'類?你有沒有在_Interface Builder_中檢查過它? – holex
在界面生成器中編寫了UIViewController類,現在我使用RootViewController類修復它,並且它可以工作。感謝您的建議。 –
不客氣。 – holex