__attribute__ ((deprecated)) does not work on objective-c protocol methods?

后端 未结 3 713
北海茫月
北海茫月 2021-02-05 18:33

I need to deprecate a single method in objective-c protocol. On normal class/instance methods I add __attribute__ ((deprecated)); after declaration.

It seem

3条回答
  •  抹茶落季
    2021-02-05 19:22

    Well, I just realised, that even Apple use __attribute__((deprecated)) at the end. And it does not work either. If I use any deprecated delegate method, e.g.

    - (UITableViewCellAccessoryType)tableView:(UITableView *)tableView
         accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath
    

    there is no warning.

    So it seems like a candidate for radar.

    EDIT: filed a radar, Bug ID# 11849771.

提交回复
热议问题