KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am working through the Stanford iPhone class and I can't figure out why I am getting a compiler warning. I assume I need to cast my object to NSString, but I get an error when I try to do so. The code runs and gives me the expected output, but the warning bothers me. NSLog(@"lowerCaseString is: %@", [object lowercaseString]); This runs with the warning: 'NSObject' may not respond to '-lowerCaseString' NSLog(@"lowerCaseString is: %@", [(NSString)object lowercaseString]); This throws an error: conversion to non-scalar type requested
Tags (comma-separated)
Save Edits
Cancel