Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/97.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
Html UILabel不在大内容的滚动视图中显示文本_Html_Ios_Uiscrollview_Uilabel - Fatal编程技术网

Html UILabel不在大内容的滚动视图中显示文本

Html UILabel不在大内容的滚动视图中显示文本,html,ios,uiscrollview,uilabel,Html,Ios,Uiscrollview,Uilabel,我的ScrollView的ContentView只包含一个UILabel,它的前导空格为8,尾随空格为8,顶部空格为容器8dp,数字行设置为0。ScrollView内容视图高度为9000 我正在向标签动态添加一个大的html内容 public override void ViewDidLoad() { base.ViewDidLoad(); var attr = new NSAttributedStringDocumentAttributes(); var nsError

我的ScrollView的ContentView只包含一个UILabel,它的前导空格为8,尾随空格为8,顶部空格为容器8dp,数字行设置为0。ScrollView内容视图高度为9000

我正在向标签动态添加一个大的html内容

public override void ViewDidLoad()
{
    base.ViewDidLoad();
    var attr = new NSAttributedStringDocumentAttributes();
    var nsError = new NSError();
    attr.DocumentType = NSDocumentType.HTML;
    contentLabel.AttributedText = new NSAttributedString(GetContent(), attr, ref nsError);

    contentLabel.Font = UIFont.FromName("Helvetica", 11f);
    contentLabel.Layer.BorderWidth = 1f;
    contentLabel.Layer.BorderColor = AZConstants.SeparatorColor.CGColor;
    contentLabel.Layer.CornerRadius = 4f;
    contentLabel.ClipsToBounds = true;
}

string GetContent()
{
        var myHtmlText = "<h4 style=\"text-align: center;\">TERMS OF SERVICE AGREEMENT</h4>\n <p>\n " +
            "PLEASE READ THE FOLLOWING TERMS OF USE AGREEMENT CAREFULLY. BY ACCESSING OR USING OUR SITES AND OUR SERVICES, YOU HEREBY AGREE\n " +
            "TO BE BOUND BY THE TERMS AND ALL TERMS INCORPORATED HEREIN BY REFERENCE. IF YOU DO NOT EXPRESSLY AGREE TO ALL OF THE TERMS AND CONDITIONS, THEN PLEASE DO\n" +
            "NOT ACCESS OR USE OUR SITES OR OUR SERVICES. THIS TERMS OF SERVICE AGREEMENT IS LAST REVISED AS  OF July 1, 2014. \n </p>";

        myHtmlText += "<h4>ACCEPTANCE OF TERMS</h4>";
        myHtmlText += "<p>\n The following Terms of Service Agreement (the \"TOS\") is a legally binding agreement that shall " +
            "govern the relationship with our users and others which may\n interact or interface with Simple Healthcare LLC " +
            "(SHL), also known as Green Circle Health(GCH), located at 5 Portofino Drive, Suite 2101, Pensacola Beach, " +
            "Florida 32561, and our\n subsidiaries and affiliates, in association with the use of the SHL websites, which includes " +
            "GOGCH.COM (the \"Site\") and its services (\"Services\"), which shall be defined below.\n </p>";
        myHtmlText += "<h4>DESCRIPTION OF SERVICES OFFERED</h4>\n <p>\n Green Circle Health (GCH) is a platform for patients to store " +
            "and share personal medical data including vitals and documents. GCH provides medical forms needed to check-in at a medical " +
            "facility. GCH enables remote monitoring of patient vitals and fitness activities for population health management and " +
            "clinical research trials.\n </p>";
        myHtmlText += "<p>\n <strong>GCH enables you to store your personal data</strong>\n </p>";
        myHtmlText += "<p>\n Any and all visitors to our site, despite whether they are registered or not, shall be deemed " +
            "as \"users\" of the herein contained Services provided for the\n  purpose of this TOS. Once an individual registers " +
            "for our Services, through the process of creating an account, the user shall then be considered a\n  \"member.\"\n </p>";
        myHtmlText += "<p>\n The user and/or member acknowledges and agrees that the Services provided and made available through " +
            "our website and applications, which may include some\n mobile applications and that those applications may be made " +
            "available on various social media networking sites and numerous other platforms and\n downloadable programs, are " +
            "the sole property of SHL. At its sole discretion, SHL may offer additional websites or services and/or products, " +
            "or update, modify or\n revise any current content and Services, and this Agreement shall apply to any and all " +
            "additional services and/or products and any and all updated,\n modified or revised Services unless otherwise " +
            "stipulated. SHL does hereby reserve the right to cancel and cease offering any of the aforementioned Services\n " +
            "and/or products. You, as the end user and/or member, acknowledge, accept and agree that SHL shall not be held " +
            "liable for any such updates, modifications,\n revisions, suspensions or discontinuance of any of our Services " +
            "and/or products. Your continued use of the Services provided, after such posting of any\n  updates, changes, and/or " +
            "modifications shall constitute your acceptance of such updates, changes and/or modifications, and as such, " +
            "frequent review of this\n Agreement and any and all applicable terms and policies should be made by you to " +
            "ensure you are aware of all terms and policies currently in effect. Should\n " +
            "you not agree to the updated, modified, revised or modified terms, you must stop using the provided Services.\n </p>";
        myHtmlText += "<p>\n Furthermore, the user and/or member understands, acknowledges and agrees that the Services offered " +
            "shall be provided \"AS IS\" and as such SHL shall not assume any responsibility or obligation for the timeliness, " +
            "missed delivery, deletion and/or any failure to store user content, communication or personalization settings.\n</p>";
        myHtmlText += "<h4>REGISTRATION</h4>\n <p>\n To register and become a \"member\" of the Site, you must be 18 years of age " +
            "to enter into and form a legally binding contract. In addition, you must be in\n good standing and not an individual " +
            "that has been previously barred from receiving SHL's Services under the laws and statutes of the United States or " +
            "other\n applicable jurisdiction.\n </p>";
        myHtmlText += "<p>\nFurthermore, the registering party hereby acknowledges, understands and agrees to:\n</p>";
        myHtmlText += "<ol type=\"a\">\n <li>\n furnish factual, correct, current and complete information with regards to yourself " +
            "as may be requested by the data registration process, and\n  </li>\n <li>\n  maintain and promptly update your " +
            "registration and profile information in an effort to maintain accuracy and completeness at all times.\n  </li>\n </ol>";
        myHtmlText += "<p>\n If anyone knowingly provides any information of a false, untrue, inaccurate or incomplete nature, " +
            "SHL will have sufficient grounds and rights to suspend or\n terminate the member in violation of this aspect of the Agreement, " +
            "and as such refuse any and all current or future use of SHL Services, or any portion\n " +
            "thereof.\n </p>";
        myHtmlText += "<p>\nIt is SHL's priority to ensure the safety and privacy of all its visitors, users and members, " +
            "especially that of children. Therefore, it is for this reason\n  that the parents of any child under the age of 18 " +
            "that permit their child or children access to the SHL website platform Services must create a \"family\"\n " +
            "account, which will certify that the individual creating the \"family\" account is of 18 years of age and as such, " +
            "the parent or legal guardian of any child\n or children registered under the \"family\" account. As the creator of the " +
            "\"family\" account, s/he is thereby granting permission for his/her child or\n children to access the various Services provided, " +
            "including, but not limited to, message boards, email, and/or instant messaging. It is the parent's and/or\n legal " +
            "guardian's responsibility to determine whether any of the Services and/or content provided are age-appropriate for his/her child.\n</p>";



        myHtmlText += ..... there are more characters in between, I can't add them all because of the character limit in stackoverflow




        myHtmlText += "<p> " +
            "Should you intend to create or to join any service, receive or request any such news, messages, " +
            "alerts or other information from our Services concerning healthcare, treatment, devices, companies, stock " +
            "quotes, investments or securities, please review the above Sections Warranty Disclaimers and Limitations of Liability again. In addition, for this " +
            "</p>";




        return myHtmlText;
    }
public override void ViewDidLoad()
{
base.ViewDidLoad();
var attr=新的NSAttributed StringDocumentAttribute();
var nsError=新的nsError();
attr.DocumentType=NSDocumentType.HTML;
contentLabel.AttributedText=新的NSAttribute字符串(GetContent(),attr,ref-nsError);
contentLabel.Font=UIFont.FromName(“Helvetica”,11f);
contentLabel.Layer.BorderWidth=1f;
contentLabel.Layer.BorderColor=AZConstants.SeparatorColor.CGColor;
contentLabel.Layer.CornerRadius=4f;
contentLabel.ClipsToBounds=true;
}
字符串GetContent()
{
var myHtmlText=“服务协议条款\n\n”+
“请仔细阅读以下使用条款协议。通过访问或使用我们的网站和服务,您在此同意\n”+
受本协议条款和所有引用条款的约束。如果您不明确同意所有条款和条件,请\n+
“不得访问或使用我们的网站或服务。本服务条款协议的最后修订日期为2014年7月1日。\n

”; myHtmlText+=“条款接受”; myHtmlText+=“\n以下服务条款协议(“TOS”)是具有法律约束力的协议,应”+ “管理与我们的用户以及可能与Simple Healthcare LLC互动或交互的其他人的关系”+ (SHL),也称为绿圈健康中心(GCH),位于彭萨科拉海滩波托菲诺大道5号2101室+ 佛罗里达32561,以及我们的子公司和附属公司,与SHL网站的使用有关,包括+ “GOGCH.COM(“网站”)及其服务(“服务”),定义如下。\n

”; myHtmlText+=“所提供服务的描述\n\n绿圈健康(GCH)是一个供患者存储的平台”+ “并共享个人医疗数据,包括生命体征和文件。GCH提供在医疗中心办理入住手续所需的医疗表格”+ “设施。GCH能够远程监控患者的生命体征和健身活动,以进行人口健康管理和管理”+ “临床研究试验。\n

”; myHtmlText+=“\nGCH使您能够存储您的个人数据”\n

”; myHtmlText+=“\n任何和所有访问我们网站的访客,无论他们是否注册,都将被视为”+ “作为此处包含的服务的“用户”\n为本TOS的目的而提供。一旦个人注册”+ “对于我们的服务,通过创建帐户的过程,用户将被视为\n\”会员。\“\n

”; myHtmlText+=“\n用户和/或会员承认并同意通过以下方式提供和提供的服务”+ “我们的网站和应用程序,其中可能包括一些\n移动应用程序,并且这些应用程序可能会制作”+ 可在各种社交媒体网站和许多其他平台上使用,以及\n可下载的程序,包括+ SHL的唯一财产。SHL可自行决定提供其他网站或服务和/或产品+ 或更新、修改或\n修订任何当前内容和服务,本协议适用于任何及所有+ 附加服务和/或产品以及任何和所有更新、修改或修订的服务,除非另有说明+ “规定。SHL在此保留取消和停止提供任何上述服务的权利\n”+ “和/或产品。您作为最终用户和/或会员,承认、接受并同意SHL不会被持有”+ 对我们的任何服务的任何更新、修改、修订、暂停或中断负责+ 和/或产品。您在发布任何更新、更改和/或后继续使用所提供的服务+ 修改应构成您接受此类更新、变更和/或修改,因此+ “您应经常审查本协议以及任何和所有适用的条款和政策,以便”+ “确保您了解当前生效的所有条款和策略。应\n”+ “如果您不同意更新、修改、修订或修改的条款,您必须停止使用提供的服务。\n

”; myHtmlText+=“\n此外,用户和/或会员理解、承认并同意提供的服务”+ 应“按原样”提供,因此SHL不承担任何责任或义务+ “未送达、删除和/或未能存储用户内容、通信或个性化设置。\n

”; myHtmlText+=“注册\n\n要注册并成为网站的“成员”,您必须年满18岁”+ 签订并形成具有法律约束力的合同。此外,您必须信誉良好,而不是个人+ “根据美国法律和法规,先前被禁止接受SHL的服务,或”+ “其他\n适用管辖区。\n

”; myHtmlText+=“\n此外,注册方在此承认、理解并同意:\n

”; myHtmlText+=“\n
  • \n提供有关您自己的真实、正确、最新和完整的信息”+ 根据数据注册过程的要求,以及\n