简体   繁体   English

对二进制表达式无效的操作数(“ CGFloat”(又名“ double”)和“ UIView * _Nullable”)

[英]Invalid operands to binary expression ('CGFloat' (aka 'double') and 'UIView * _Nullable')

Hi i am getting the following error while converting from swift to objective c code. 嗨,我从Swift转换为目标C代码时收到以下错误。 Please see the screenshot. 请看截图。

在此处输入图片说明

在此处输入图片说明

As Mike Taverne commented, the ! 正如Mike Taverne所说,! needs to go. 需要走。 Insead of !. 侵害!. I think you probably want -> if the is supposed to be objective C. ObjC seems to think you want to subtract _profileBelowView.superView from offsetY. 我认为您可能想要->如果应该以目标C为对象。ObjC似乎认为您想从offsetY中减去_profileBelowView.superView。 You could try putting parentheses around the second half of the subtraction. 您可以尝试在减法的后半部分加上括号。 That's not the real problem here but you might have gotten a better error message once the order of operations issue was removed. 这不是真正的问题,但是一旦删除了操作顺序问题,您可能会得到更好的错误消息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 二进制表达式的操作数无效('double'和'double *') - Invalid operands to binary expression ('double' and 'double *') 二进制表达式的无效操作数('NSMutableArray' 和 'double') - Invalid operands to binary expression ('NSMutableArray' and 'double') 对二进制表达式无效的操作数(“ BOOL”(又名“ signed char”)和“ void”) - Invalid operands to binary expression ('BOOL' (aka 'signed char') and 'void') Objective-C-二进制表达式('double')到('double *')的无效操作数 - Objective-C - Invalid operands to Binary Expression ('double') to ('double *') objective-c二进制表达式的无效操作数double to double - objective-c invalid operands to binary expression double to double iOS NSNumber二进制表达式的操作数无效(NSNumber *“和'double') - iOS NSNumber Invalid operands to binary expression (NSNumber *" and 'double') 二进制运算符'+'不能应用于类型'Double'和'Element'(又名'AnyObject')的操作数 - Binary Operator '+' cannot be applied to operands of type 'Double' and 'Element' (aka 'AnyObject') 对二进制表达式无效的操作数(“ int”和“ NSString”) - Invalid operands to binary expression ('int' and 'NSString') NSInteger乘法:对二进制表达式无效的操作数 - NSInteger multiplication: Invalid operands to binary expression iOS CGFloat语义问题-无效的操作数 - iOS CGFloat Semantic Issues --Invalid Operands
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM