How to dynamically set background color in IOS? -


I have to set the background color in the iOS using string value. It should be done dynamically how is it possible?

  myColors = @ [@ "redColor", @ "greencolor", @ "blue color ", @" Yellow color ", @" black color ", @" cyan coral ", @" magenta cloor ", @" purple color ", @" gray color "]; // value in NSArray / int a = arc4random ()% 9; // Choose Random Value // SEL ABC = NSSelectorFromString ([myColors objectAtIndex: A]); [_canvas setBackgroundColor: [UIColor performSelector: abc]];    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -