2011-05-15 68 views
-1

在我的应用程序委托中,我有一个连接到不同视图的UIButton的IBOutlet。该视图显示如下:在不同视图中隐藏UIButton?

// .h 
IBOutlet UIView *theToolbar; 

// .m 
[window addSubview:theToolbar]; 
theToolbar.frame = CGRectMake(0, 425, 320, 44); 

这里就是我做的这一切在我的应用程序委托:

// .h 
IBOutlet UIButton *disbledCameraButton; 
@property (copy, readwrite) UIButton *disabledCameraButton; 

// .m 
@synthesize disabledCameraButton; 

最后,我试图把它藏在一个不同的类:

#import "TableViewAppDelegate.h" 
TableViewAppDelegate *dataCeter = (TableViewAppDelegate *)[[UIApplication sharedApplication] delegate]; 
dataCeter.disbledCameraButton.hidden = YES; 

不过,我得到这个错误:

accessing unknown disabledCameraButton getter Method 

这是为什么这样做?谢谢。

回答

3

你在那里有一些错别字。修复这些,它应该工作。

功能已停用/禁用

+1

我傻......哇......我觉得自己很蠢......也只好用'非原子,retain'财产。 – iosfreak 2011-05-15 23:45:55