Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone “更多”;非结构或工会成员的请求”;错误_Iphone_Cocos2d Iphone_Uiactivityindicatorview - Fatal编程技术网

Iphone “更多”;非结构或工会成员的请求”;错误

Iphone “更多”;非结构或工会成员的请求”;错误,iphone,cocos2d-iphone,uiactivityindicatorview,Iphone,Cocos2d Iphone,Uiactivityindicatorview,我使用的是coocs2d,在评论时会出现标题错误。我将UIKit导入到标题中 -(void)timerLoad:(NSTimer *)timer { timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(timerLoad:) userInfo:nil repeats:YES]; if (loadingBar.loading) { //error

我使用的是coocs2d,在评论时会出现标题错误。我将UIKit导入到标题中

-(void)timerLoad:(NSTimer *)timer {
    timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0) target:self selector:@selector(timerLoad:) userInfo:nil repeats:YES];
    if (loadingBar.loading) { //error
        [activity stopAnimating];
    }
    else {
        [activity startAnimating];
    }
    if (loadingBar.loading = NO) { //error
        activity.HIDDEN = YES; //thanks ;)
    }
}
loadingBar是一个CCProgressTimer和
活动是UIActivityIndicatorView

您是否已将
CCProgressTimer.h
头文件导入此实现文件?如果您所做的只是一个转发声明(
@class CCProgressTimer
),那么它会告诉编译器存在一个具有该名称的类,但不会告诉编译器该类的属性。必须导入点语法(
loadingBar.loading
)的头才能对编译器有意义


(另外,
UIView
有一个
hidden
属性,而不是
visible
属性。)

尝试在视图类的.h文件中向前声明控制器类

@类控制器

@界面视图


希望对你有帮助

给乔纳森打个好电话。自从我来自C#Net以来,那些可见/隐藏的东西总是让我着迷。谢谢,我把可见变成了隐藏。我还导入了CCProgressTimer,但这对错误没有任何影响#导入顺便问一下,编译器的实际输出是什么?你是说编译错误?它请求在非结构或联合中“加载”成员。那么
loadingBar
是否属于其他类型?你确定它有一个加载属性吗?谢谢,我已经完成了@class CCProgressTimer;在头文件中