0
我試圖在iOS中爲我的UITableView實現拉到刷新。除了我無法正確執行刷新操作將執行的操作之外,該實現幾乎完成。鑄造一個Objective-C指向'SEL'的指針不允許使用ARC
[self.refreshControl addTarget:self
action:(SEL)[self performSelector:@selector(fetchPhotoListWith:Using:)
withObject:@"https://api.instagram.com/v1/users/self/feed?access_token="
withObject:@"<my Instagram ID>"]
forControlEvents:UIControlEventValueChanged];
(在viewDidLoad
啓動),上面的代碼提供了以下錯誤:
Cast of an Objective-C pointer to 'SEL' is disallowed with ARC
如果我在前面取下(SEL)
鑄造,這次我得到以下錯誤:
Implicit conversion of an Objective-C pointer to 'SEL' is disallowed with ARC
另一個警告:
Incompatible pointer types sending 'id' to parameter f type 'SEL'
如何在用兩個參數調用我的方法的同時與ARC玩好?