0

I have open my application for Xcode 7.5 beta, I am getting following error in Apple Watch code - enter image description here Please help me. Thanks.

Anupam Mishra
  • 3,408
  • 5
  • 35
  • 63
  • 4
    Please don't use images for showing textual information. Copy the code, highlight it with *Ctrl+K* and comment (if necessary), whenever it's possible. – René Hoffmann Aug 20 '15 at 15:07

1 Answers1

1

You need to change your line to

NSString *eventId = [(ArtistRow*)theRow accessibilityValue];

Otherwise, even though you have checked that your row controller is of class ArtistRow compiler still treats it as id (which is the return type from rowControllerAtIndex:)

rebello95
  • 8,486
  • 5
  • 44
  • 65
Andriy Gordiychuk
  • 6,163
  • 1
  • 24
  • 59
  • Hi Andriy , I din't declared any variable of name 'accessibilityValue' in my 'ArtistRow' class . So if i am typecasting it doesn't affect it. – Anupam Mishra Aug 20 '15 at 15:21
  • @user3185320 if ArtistRow and its superclasses don't have a variable 'accessibilityValue' then why are you finding it strange that compiler throws an error? :) – Andriy Gordiychuk Aug 20 '15 at 15:23
  • apple already provided these properties like 'tag' , 'accessibilityValue', 'accessibilityLabel' I am using that property to setting it's value like - '[theRow setAccessibilityValue:eventDataObj.EventID];' which is f9 , but getting issue while accessing this value in Xcode 7.5 beta – Anupam Mishra Aug 20 '15 at 15:31
  • @user3185320 this is a very strange issue. I am testing identical code in Xcode 7 beta 5 and it is working fine. Is there any chance that you can share your actual source code? Or maybe you can create a dummy app which reproduces this issue? It would really help – Andriy Gordiychuk Aug 20 '15 at 20:51