【发布时间】:2019-11-07 09:47:47
【问题描述】:
我正在尝试将值从 swift 类传递给目标 C 类,但是在 swift 类中创建的委托无法从目标类中识别。
快速类:
protocol ChildViewControllerDelegate
{
func childViewControllerResponse(parameter)
}
class ChildViewController:UIViewController
{
var delegate: ChildViewControllerDelegate?
}
目标C类:
#import "Project-Swift.h"
@interface MainViewController()<ChildViewControllerDelegate>
{
// Define Delegate Method
func childViewControllerResponse(parameter)
{
}
}
Objective C 类无法检测委托。我将如何解决这个问题或我做错了什么?
【问题讨论】:
标签: objective-c swift delegates