I'm trying to add some UICollectionViewDelegate methods for my objc view controller MyViewController.m
; And that view controller already conforms to <UICollectionViewDelegate>
and has implemented some delegate methods;
However I don't want to add the new methods in that objc file because the code is too old and I want to create a swift file for just adding new delegate methods, so I created MyViewController.swift
, and put
extension SFSearchViewController : UICollectionViewDelegate {}
However, it shows an warning:
Conformance of 'MyViewController' to protocol 'UITableViewDelegate' was already stated in the type's module '__ObjC'
and when I tap func collection, there is NO delegates method comes out in the imagined results.
I wonder if there is a good way to do this?