0

having a weird issue comparing two NSIntegers after doing a subtraction, any ideas why this comparison returns "< nil >" instead of false? I checked to make sure I had values for all variables in the debugger

    NSInteger totalPhotosLeft = self.totalPhotosInRoll - self.currentPhotosFetchedCount;
    if (self.enumerateCount < totalPhotosLeft) {
        ...//never goes here, comparison above always returns < nil >
    }

My properties

@property (nonatomic) NSInteger currentPhotosFetchedCount;
@property (nonatomic) NSInteger enumerateCount;
@property (nonatomic) NSInteger totalPhotosInRoll;

viewDidLoad

self.currentPhotosFetchedCount = 60;
self.enumerateCount = 15;
self.totalPhotosInRoll = 65;
yoshyosh
  • 13,956
  • 14
  • 38
  • 46

1 Answers1

0

While debugging I was using po instead of p. po is for printing out objects, p is for printing out in general.

Thanks to @rmaddy for figuring that out so quickly

yoshyosh
  • 13,956
  • 14
  • 38
  • 46