开发者

How would I use a method from another class?

I have a class with a specific uisearchbar method.. How would I use the same method in another view (i.e. another class) that has another uisearchbar... Besides simply copying over the code? Would subcla开发者_高级运维ssing work in this case?

Thanks


Put it as a method in the App delegate.You can access the app delegate in any of the views. [I know its ugly, but it seems the simplest way, If subclassing or category are too much of an overhead.]

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜