Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.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
Swift 在“theMove*”类型的对象上找不到属性“move”_Swift_Objective C_Iso - Fatal编程技术网

Swift 在“theMove*”类型的对象上找不到属性“move”

Swift 在“theMove*”类型的对象上找不到属性“move”,swift,objective-c,iso,Swift,Objective C,Iso,我有两门课,第一门是objective-c,第二门是swift 在objective-c类中,我想从swift调用一些代码,但我得到了这个错误 Property 'move' not found on object of type 'theMove *' 在swift里我有这个密码 @objc enum Move : NSInteger { case one, two } @objc public class theMove :NSObject { var move

我有两门课,第一门是objective-c,第二门是swift

在objective-c类中,我想从swift调用一些代码,但我得到了这个错误

Property 'move' not found on object of type 'theMove *'
在swift里我有这个密码

@objc enum Move : NSInteger
{
   case one, two 
}
 
@objc public class theMove :NSObject
{    
    var move : Move
    @objc init(move : Move)
    {
        self.move = move
    }
}
在目标中-c

调用fristTurn.move时出现错误

@property (nonatomic) theMove * fristTurn;

fristTurn.move 
你能帮我解决这个错误吗

Property 'move' not found on object of type 'theMove *'
@objc变量移动:移动

@objcMembers公共类move:NSObject

允许

@property (nonatomic) TheMove *firstTurn;

-(void)thing { 
    self.firstTurn = [[TheMove alloc] initWithMove:MoveTwo];
    self.firstTurn.move = MoveOne;
}
Objective-C推理是严格执行的。如果你不说它暴露于Objective-C,它就没有暴露

还有风格点。更喜欢大写的类名MOVE而不是MOVE