You can only apply protocols to Objective-C objects, not to primitive types. You will therefore need to use NSNumber
to store the int
:
@property(nonatomic) NSNumber<Optional> *background_no;
and use auto-boxing, to store it:
someObject.background_no = @(123);