初期化する際に、NSNotFound
を代入する
NSNotFoundかどうかで値が代入されたかどうか判定する
@interface Paginator
@property (nonatomic, assgin) NSUInteger currentPage;
@end
@implementation
- (id)init
{
self = [super init];
if (self) {
self.currentPage = NSNotFound;
}
}
- (BOOL)hasCurrentPage
{
return _currentPage != NSNotFound;
}
@end