Iphone 如何设置占位符字符(%)?
在Objective-c中。。。 我想要表示占位符字符(%) 但是我的代码不Iphone 如何设置占位符字符(%)?,iphone,objective-c,placeholder,Iphone,Objective C,Placeholder,在Objective-c中。。。 我想要表示占位符字符(%) 但是我的代码不 NSString *base = @"<style type=\"test/css\">div{width:100\%}</style><body>%@</body>"; NSString *html = [NSString stringWithFormat:base, @"hello world"]; NSLog(@"%@",html); NSString*base=
NSString *base = @"<style type=\"test/css\">div{width:100\%}</style><body>%@</body>";
NSString *html = [NSString stringWithFormat:base, @"hello world"];
NSLog(@"%@",html);
NSString*base=@“div{width:100\%}%@”;
NSString*html=[NSString stringWithFormat:base,@“hello world”];
NSLog(@“%@”,html);
- expect:div{width:100%}
- 实数:div{width:100}
NSString *base = @"<style type=\"test/css\">div{width:100%%}</style><body>%@</body>";
NSString*base=@“div{width:100%%}%@”;
格式说明符的完整列表如下。请尝试以下操作:
NSString *base = @"<style type=\"test/css\">div{width:100%%}</style><body>%@</body>";
NSString*base=@“div{width:100%%}%@”;
格式说明符的完整列表如下所示