-3

I'm trying to find characters (e.g. A,b,c) within a UILabel, I'm using random words from a .plist file for the words but would like to hide the buttons not containing the letters of the selected word.

Is it possible in Objective-C

Thank You in advance

ChrisS
  • 1
  • 1
  • You can achieve what you desire, by studying the answer [HERE](http://stackoverflow.com/questions/2753956/how-do-i-check-if-a-string-contains-another-string-in-objective-c), and a little more. Please search exhaustively before posting a new questions. – n00bProgrammer Aug 25 '14 at 10:42

1 Answers1

0
if ([UILabel.text rangeOfString:@"a"].location != NSNotFound)
{
   // do stuff here
}

UILabe.text is a NSString, so just search on how to do what you are asking for a NSString.

MichaelCMS
  • 4,703
  • 2
  • 23
  • 29