Changing an instance variable in a block

后端 未结 1 898
情话喂你
情话喂你 2021-01-02 15:53

I am quite confused about how to change an instance variable inside of a block.

The interface file (.h):

@interface TPFavoritesViewController : UIVie         


        
相关标签:
1条回答
  • 2021-01-02 16:43

    Your assignment to refreshing is an implicit reference to self, it is shorthand for:

    self->refreshing = YES;
    

    hence the cycle warning. Change it to:

    temp_self->refreshing = YES;
    
    0 讨论(0)
提交回复
热议问题