Top "Stringwithformat" questions

Method on the class NSString in Apple's Cocoa framework; takes a printf-style format string and a variable number of other arguments to create an instance of NSString.

NSString stringWithFormat

I don't know what I am missing here. I am trying to concatenate strings using [NSString stringWithFormat] function. This is …

iphone nsstring stringwithformat
NSString stringWithFormat adding a percent

How can I add a percent to my stringWithFormat function? For example, I'd like to have the following: float someFloat = 40.233…

iphone ios nsstring stringwithformat
How to prepend url with http:// using stringWithFormat in Swift

I'm building a custom browser using UIWebView. Use case: User enters "www.abc.com" into the address bar. Error below …

string swift stringwithformat
In Swift, how to insert formatted Int value into String?

This seems like a super basic question, but I just can't seem to find the answer anywhere :-( I am …

ios string swift nsnumberformatter stringwithformat
objective-c stringvalue from double

I have the following code: double d1 = 12.123456789012345; NSString *test1 = [NSString stringWithFormat:@"%f", d1]; // string is: 12.123457 NSString *test1 = [NSString stringWithFormat:@"%g", …

iphone objective-c ios double stringwithformat
NSString stringWithFormat - trying to set a label to double digits for single digit numbers

I am trying to have a label display single-digit numbers as double-digit numbers (ie. 1 => 01) . I may be using the …

objective-c stringwithformat
How to append the string variables using stringWithFormat method in Objective-C

I want to append the string into single varilable using stringWithFormat.I knew it in using stringByAppendingString. Please help me …

objective-c append stringwithformat
StringWithFormat "%.2ld" objc to swift

I have an 'pickerView' object in a swift project. I do understand the code in Objective-c but I'm not sure …

ios objective-c swift uipickerview stringwithformat
comma separated thousand NSString stringWithFormat

Is it possible to display 1000.99 as 1,000.99 using [NSString stringWithFormat:@"£%0.2f", 1000.99] Please guide me if I am not on the right …

iphone ios objective-c nsstring stringwithformat
Displaying Integer value in a Label , int to String conversion?

How to display an integer value in a UILabel in ViewDidLoad? I did for text and date and image but …

ios nsstring stringwithformat