-5

How to?

.h

@property (nonatomic, strong) NSNumber *seasonRoundN;
@property (nonatomic, strong) NSString *seasonRound;

.m

_weMeetAgain = [NSNumber numberWithInt:13];
_seasonRound = [NSString stringWithFormat:_weMeetAgain]; // incompatible :S

Should have looked at the reference better: (Answer below)

_weMeetAgain = [NSNumber numberWithInt:17];
_seasonRound = [NSString stringWithFormat:@"%@", _weMeetAgain];

Help :P, thank you.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user3295409
  • 23
  • 1
  • 8

2 Answers2

5
[NSString stringWithFormat:@"%d", [_weMeetAgain intValue]]
Grzegorz Krukowski
  • 18,081
  • 5
  • 50
  • 71
5

Simply use NSNumber instance method stringValue.

_seasonRound = [_weMeetAgain stringValue];
Dobroćudni Tapir
  • 3,082
  • 20
  • 37