Trying to cast the return of objectAtIndex.
(MyClass *)[myArray objectAtIndex:1].name;
Can you cast inline like this in Objective-C?
Yes you can:
((MyClass *)[myArray objectAtIndex:1]).name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With