Swift function containing parameters not available in Objective-C class

后端 未结 2 1788
感动是毒
感动是毒 2021-01-26 09:03

UPDATE: This question does not duplicate the question mentioned above. It was verified (see comment below) that the method definition IS properly added to the

2条回答
  •  自闭症患者
    2021-01-26 09:55

    Lou Franco's explanation is correct. Your function has an Int? parameter, and there is no equivalent of that in Objective-C. Therefore the entire function cannot be exposed to Objective-C. Use Int or, if it really can be nil, use NSNumber?.

提交回复
热议问题