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.]
精彩评论