Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为iphone应用程序设置html字体_Html_Iphone_Fonts - Fatal编程技术网

如何为iphone应用程序设置html字体

如何为iphone应用程序设置html字体,html,iphone,fonts,Html,Iphone,Fonts,我正在用html设置字体,但它不起作用。这是我的密码 NSString * emailBody =@"<html><body>Thank you for your participation in Consulting<br>Practitioner and Client Program.</br> <br>Attached is the copy of your signed contract for your

我正在用html设置字体,但它不起作用。这是我的密码

    NSString * emailBody =@"<html><body>Thank you for your participation in
    Consulting<br>Practitioner and Client Program.</br>
    <br>Attached is the copy of your signed contract for your records
    <p>Please email or fax your completed W-9 form to
    <br>our PEI Support Team
    <br>Email:PEISupportServices@zoetis.com
    <br>Fax:800-741-1310
    <p><b><u><font color:'#888888'>IMPORTANT: Please provide invoice for this 
    consultation to your Zoetis Representative to ensure payment.  
    Do NOT mail directly to Zoetis.</u></b>
    <p>Billing Address:<br>Zoetis<br>100 Campus Drive<br>Florham Park, NJ  07932
    <body></html>";
NSString*emailBody=@“感谢您参与
咨询
从业者和客户计划

附件是您签署的合同副本,供您存档 请将填妥的W-9表格电邮或传真至
我们的PEI支持团队
电邮:PEISupportServices@zoetis.com
传真:800-741-1310 重要事项:请提供发票 咨询您的Zoetis代表以确保付款。 不要直接邮寄给Zoetis。 账单地址:新泽西州弗洛勒姆公园校园大道100号,邮编07932 ";
因为您的HTML无效。专门针对您需要的字体

<font color="#888888">

您将CSS语法与HTML语法混合在一起。您也没有任何关闭标记


此外,您的body标签将在末尾打开。你需要

我用以下方式,字体名称和颜色

     - (NSString *)messageBody
     {


             NSMutableString *emailBody = [NSMutableString stringWithFormat:@"<div> \n"
                                  "<p style=\"font:17px Helvetica,Arial,sans-serif\">%@</p> \n"
                                  "<h1 style=\"font:bold 16px Helvetica,Arial,sans-serif\"><a target=\"_blank\" href=\"%@\">%@</a></h1> \n"
                                  "<br> \n"
                                  "<table align=\"center\"> \n"
                                  "<tbody> \n"
                                  "<tr> \n"
                                  "<td valign=\"top\" align=\"center\"> \n"
                                  "<span style=\"font-family:Helvetica,Arial;font-size:11px;color:#696969;font-weight:bold\"> \n"
                                  "</td> \n"
                                  "</tr> \n"
                                  "<tr> \n"
                                  "<td align=\"left\"> \n"
                                  "<span style=\"font-family:Helvetica,Arial;font-size:11px;color:#696969\"> \n"
                                  "Please note that you have not been added to any email lists. \n"
                                  "</span> \n"
                                  "</td> \n"
                                  "</tr> \n"
                                  "</tbody> \n"
                                  "</table> \n"
                                  "</div>",
                                  self.message,
                                  [self.appStoreURL absoluteString],
                                  self.applicationName
                                  ];

             return emailBody;

         }
-(NSString*)消息体
{
NSMutableString*emailBody=[NSMutableString stringWithFormat:@“\n”
“

%@

\n” “\n” “
\n” “\n” “\n” “\n” “\n” “\n” “\n” “\n” “\n” “\n” “\n” “请注意,您尚未添加到任何电子邮件列表。\n” “\n” “\n” “\n” “\n” “\n” "", 自我信息, [self.appStoreURL绝对字符串], self.applicationName ]; 返回电子邮件正文; }