Chris
Chris

Reputation: 12181

NSString Error - Interface type cannot be statically allocated

I'm trying to create an NSDictionary object where the keys are defined with the number of the song, along with the information. I'm getting the above error when trying to define the NSNumber that is being passing into the method:

+(NSDictionary *) initWithMPMediaItem:(MPMediaItem *) song andSongNumber: (NSNumber *)songCount{

NSString *songKey = @"%@ Song Title", songCount;

Upvotes: 1

Views: 3665

Answers (1)

mipadi
mipadi

Reputation: 410542

It looks like you want to use:

NSString *songKey = [NSString stringWithFormat:@"%@ Song Title", songCount];

Upvotes: 7

Related Questions