有一代码如下:
@class tabbarView;
@interface tabbarViewController : UIViewController
@property(nonatomic,strong) tabbarView *tabbar; //注意看这一行,这里 tabbar 前面没有下划线
@property(nonatomic,strong) NSArray *arrayViewcontrollers;
@end
再看下面这个实现,在 tabbar 前面为什么要加个下划线呢?( 变成了 _tabbar )@implementation tabbarViewController
- (void)viewDidLoad
{
[super viewDidLoad];
//以下行中 tabbar 前面都加了下划线,不知为啥?
_tabbar = [[tabbarView alloc]initWithFrame:CGRectMake(0, 960, 320, 60)];
_tabbar.delegate = self;
[self.view addSubview:_tabbar];
}
谢谢各位!
@class tabbarView;
@interface tabbarViewController : UIViewController
@property(nonatomic,strong) tabbarView *tabbar; //注意看这一行,这里 tabbar 前面没有下划线
@property(nonatomic,strong) NSArray *arrayViewcontrollers;
@end
再看下面这个实现,在 tabbar 前面为什么要加个下划线呢?( 变成了 _tabbar )@implementation tabbarViewController
- (void)viewDidLoad
{
[super viewDidLoad];
//以下行中 tabbar 前面都加了下划线,不知为啥?
_tabbar = [[tabbarView alloc]initWithFrame:CGRectMake(0, 960, 320, 60)];
_tabbar.delegate = self;
[self.view addSubview:_tabbar];
}
谢谢各位!
解决方案 »
- 使用Cococ async socket库编译报错
- 求 一个 iphone 相册实现的方法
- 大家帮帮新手菜鸟嘛不然我准备卷起铺盖走人了 DLL问题
- iphone 用UC浏览器访问不了本地局域网
- 求IOS录屏并录声音的方案
- IOS8 全屏的界面调用系统的相册或者拍照返回的时候,状态栏隐藏不了
- tableview的编辑状态
- 新人求助,关于table view的这种蓝色的勾怎么做
- 真机调试An error was encountered while enabling development on this device. 不知道怎么解决
- iOS Swift 的NSSetUncaughtExceptionHandler全局异常捕获不回调
- 求教:自绘的 Tab ,如何在storyboard各个场景中都显示?
- VS2012开发出来HTML5+WebService的Web应用 怎么用XCode打包成为IOS平台上的WebApp?
@class tabbarView;
@interface tabbarViewController : UIViewController
@property(nonatomic,strong) tabbarView *tabbar; //注意看这一行,这里 tabbar 前面没有下划线
@property(nonatomic,strong) NSArray *arrayViewcontrollers;
@end在这段代码之前,应该有如下代码@interface tabbarViewController : UIViewController
{
tabbarView *_tabbar;
}
@end实现中应该有如下代码@implementation tabbarViewController
@synthesize tabbar = _tabbar;
http://bbs.csdn.net/topics/390462265