开发者

objective-c runtime delegates question

开发者 https://www.devze.com 2023-03-04 06:22 出处:网络
So this may be a really du开发者_开发百科mb question, but is it possible to create a new delegate object at runtime without having to create an entire class interface/implementation for it?I basically

So this may be a really du开发者_开发百科mb question, but is it possible to create a new delegate object at runtime without having to create an entire class interface/implementation for it? I basically wanna spawn off a new webview and make a delegate for it that just implements webViewDidFinishLoad so I can do some size manipulation then. It seems like a lot of overhead to create an entirely new class just for one method.


You can implement the delegate methods in your existing class. Just set the delegate to self and implement the methods you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消