objective c - How can I use a nullable int or a NSInteger pointer? -
I have not been set already, so it needs a value to calculate in the getter method I I like to use the nullable int build, so I do not need another bool to check that it has already been done.
My first bud was to go for a NSInteger * I can check whether it is a tap and otherwise there is a value set for it but I do not know if it is possible That's because I can not really get the value assigned to it.
if (! Value) {value = [self calcValue]; } return value; It leads to
P> I How do I specify a int as a nsinteng * ?
How do I put a NSInteger * to a ?
A NSInteger is actually a int . You are searching for NSNumber , which lets you treat numbers as objects.
Comments
Post a Comment