func performOperation(operation:Double->Double) {
ifoperandStack.count >= 1 {
displayValue = operation(operandStack.removeLast())
enter()
}
}
스탠포드 대학의 swift 강좌를 보면서 다시 정리 하던 중에,
performOperation 메소드를 구현해야 하는 곳이 있었다.
강좌는 잘 진행 되던데… Swift2 / Xcode7 에서는
“Compiler error: Method with Objective-C selector conflicts with previous declaration with the same Objective-C selector”
에러가 발생했다.
헐… 당연 구글링을 하였으며, 거기에 답이 있었다.
여기를 보면, 마지막에 명쾌한 답이 있다. 요약해 보자면 메소드 위에
@nonobjc
넣어 주면 된다. 끝… 이제 삽질의 답을 찾았으니, 강좌 계속 듣자.. ㅋㅋ 또 다른 삽질을 위하여…
답글 남기기
로그인을 해야 댓글을 남길 수 있습니다.