The following code example prints the value of NSInteger object using the NSLog function.
//
// PrintNSInteger.h
// DataTypes
//
#import <Foundation/Foundation.h>
@interface PrintNSInteger : NSObject
{
NSInteger *mnsinteger;
}
-(void) print;
@end
The implementation of the PrintNSInteger class is as follows:
//
// PrintNSInteger.m
// DataTypes
//
#import "PrintNSInteger.h"
@implementation PrintNSInteger
-(void) print
{
NSLog(@"NSInteger value :%@", mnsinteger);
}
@end
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.