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

后端 未结 4 1168
时光说笑
时光说笑 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:16

    I just got my problem resolved, in my case a CoreLocation Project, using both answers from Tom and Chris -

    I declare:

    @property (strong, nonatomic)CLLocationManager *locationManager;
    

    And implemented like:

    @synthesize locationManager = _locationManager;
    ....
    - (void) dealloc {
             [self locationManager];
    }
    

提交回复
热议问题