Saturday 15 August 2015

ios - Concatenate multiple expressions into one UITextField -


I need to assign a combination of a static bit text, followed by NSNumber followed by NSMutableString . Text Properties of a UITextField I can write one of three pieces in different UITfixfield, but how can you add them all to one? "post-text" itemprop = "text">

Take this example:

  NSInteger integer = 100; Float float = 43.57; NSNumber * number = ....; NSMutableString * string = [NSMutableString stringWithString: @ "This string is"]; [String apformat: @ "int =% d, and float% f and nsnumber% @", integer, float, number];   

You can now set this string to be in UITextField .

  yourTextField.text = string;   

And read it.

No comments:

Post a Comment