我有一份叙文,没有适用以下声明:
NSString *myString = @"some text";
[myString stringByAppendingFormat:@"some text = %d", 3];
没有任何原木或错误,只是表面上的变化。 我已经与国家安全局(有文件记载)和国家安全局统计处进行了审判。
任何令人非常欢迎的内容。
我有一份叙文,没有适用以下声明:
NSString *myString = @"some text";
[myString stringByAppendingFormat:@"some text = %d", 3];
没有任何原木或错误,只是表面上的变化。 我已经与国家安全局(有文件记载)和国家安全局统计处进行了审判。
任何令人非常欢迎的内容。
我建议更正(documentation):
NSString *myString = @"some text";
myString = [myString stringByAppendingFormat:@" = %d", 3];
参考:
通过向接收人提供根据特定格式铺设的插图和以下论点,回归线。
工作时,你只是无视收益价值,即随附格式的描述。 (见 docs ) 您可以修改国家抽样调查——修改国家抽样调查,使用-appendFormat:。
当然,以你为榜样,你可以缩短:
NSString *myString = [NSString stringWithFormat:@"some text = %d", 3];
然而,你很可能需要用一种形式来说明在其他地方建立的现有结构。 在该案中,特别是如果你重新使用多个部分,那么,最好考虑和平衡使用一种可变的扼杀或几种可变的自动释放装置的利弊。
采用<代码>@”创建“,总是产生不可改变的扼杀。 如果你想设立一个新的国家安保委员会,则如下。
NSMutableString *myString = [NSMutableString stringWithString:@"some text"];
[myString appendFormat:@"some text = %d", 3];
我有类似的警告信息,同时看到了局部的扼杀。 这是我是如何解决的。
NSString *msgBody = [msgBody stringByAppendingFormat:@"%@",NSLocalizedString(@"LOCALSTRINGMSG",@"Message Body")];
I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...
i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...
Is there any way to obfuscate Objective-C Code ? Thanks
Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...
I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...
I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...