2013-10-14 112 views
0

我是一個iOS開發人員使用Mac OS X 10.8.5和Xcode 5.我試圖使我的iPhone應用程序通用,但我的viewController的對象(如按鈕,文本視圖等)不會連接到viewController的類。我嘗試添加一個自定義類到viewController,但自定義類自動返回到UIViewController(是的,我檢查了類的拼寫)。自定義類適用於我的iPhone故事板,但不適用於我的iPad故事板。我也嘗試重新啓動Xcode,甚至我的iMac,迄今爲止還沒有工作。界面生成器 - 自定義類不顯示

這裏是我的類的代碼(h文件):

@interface hackScreen : UIView 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldOne; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldTwo; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldThree; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldFour; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldFive; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldSix; 
@property (retain, nonatomic) IBOutlet UITextView *txtfieldSeven; 
@property (retain, nonatomic) IBOutlet UITextView *DatRandomBinary; 
@property (retain, nonatomic) IBOutlet UITextView *leDoneMessage; 



- (IBAction)tallStar:(id)sender; 
- (void) oneStar; 
- (void) tigerStar; 
- (void) blackStar; 
- (void) pineStar; 
- (void) blueStar; 
- (void) redStar; 
- (void) cloudStar; 
- (void) assemblyCode; 
- (void) assemblyTwo; 
- (void) radioActive; 

@end 

這裏是我的viewController的身份檢查的畫面: viewController identity inspector

回答

0

hackscreen類是UIView一個子類沒有的UIViewController

-1

您的hackScreen類需要是UIViewController的一個子類才能顯示在檢查器中。所以你只需要將hackScreen類改爲UIViewController的子類,而不是UIView。

例如

@interface hackScreen:UIViewController中

...

@end

0

下降的UIView到廈門國際銀行,她的班級設置爲你的類,然後去的viewController網點,使 「景」 之間的關係fieldController和放下的視圖。

0

請更改:

 @interface hackScreen : UIView 

 @interface hackScreen : UIViewController 
相關問題