Xcode warning “Property access results unused - getters should not be used for side effects”

后端 未结 4 1069
时光说笑
时光说笑 2021-02-01 00:31

I\'m getting this warning when I\'m calling a local routine.

My code is this:

-(void)nextLetter {
    // NSLog(@\"%s\", __FUNCTION__);
    currentLetter          


        
4条回答
  •  盖世英雄少女心
    2021-02-01 01:09

    The dot notation (i.e. self.fetchLetter) is meant for properties, not for arbitrary methods. The self.fetchLetter is being interpreted as "get the 'fetchLetter' property of 'self'," which isn't what you intend.

    Just use [self fetchLetter] instead.

提交回复
热议问题