0

I have a class SSENoteTrack that conforms to two protocols, SSETrack and SSENoteContainer. Both of those protocols declare an @property in the interface file:

@property (nonatomic, assign, getter = isMuted) BOOL muted;

In SSENoteTrack.h, I synthesize the property.

@synthesize muted;

On an instance of SSENoteTrack, the property starts as nil. I try to set it in another class' code like so:

[track setMuted:YES]

I can set the property to YES just fine. However, I can't set the property to NO. e.g. After the line [track setMuted:NO], track.isMuted returns nil.

Quite a strange issue. Perhaps it's because of the way my protocol is set up? Thanks!

Black Frog
  • 11,595
  • 1
  • 35
  • 66
rizzes
  • 1,532
  • 20
  • 33

1 Answers1

0

Yep, I'm an idiot. See this SO post: https://stackoverflow.com/a/4289697/1539826. I was typing po in lldb to check isMuted, rather than p and that's why I was getting nil not 0.

Community
  • 1
  • 1
rizzes
  • 1,532
  • 20
  • 33