<small id='Fte8o'></small><noframes id='Fte8o'>

  • <legend id='Fte8o'><style id='Fte8o'><dir id='Fte8o'><q id='Fte8o'></q></dir></style></legend>

    <tfoot id='Fte8o'></tfoot>
        <bdo id='Fte8o'></bdo><ul id='Fte8o'></ul>

      1. <i id='Fte8o'><tr id='Fte8o'><dt id='Fte8o'><q id='Fte8o'><span id='Fte8o'><b id='Fte8o'><form id='Fte8o'><ins id='Fte8o'></ins><ul id='Fte8o'></ul><sub id='Fte8o'></sub></form><legend id='Fte8o'></legend><bdo id='Fte8o'><pre id='Fte8o'><center id='Fte8o'></center></pre></bdo></b><th id='Fte8o'></th></span></q></dt></tr></i><div id='Fte8o'><tfoot id='Fte8o'></tfoot><dl id='Fte8o'><fieldset id='Fte8o'></fieldset></dl></div>

        以编程方式添加时模糊 UILabel

        时间:2023-05-31
        <tfoot id='zRxUB'></tfoot>

        1. <legend id='zRxUB'><style id='zRxUB'><dir id='zRxUB'><q id='zRxUB'></q></dir></style></legend>
            <bdo id='zRxUB'></bdo><ul id='zRxUB'></ul>
                    <tbody id='zRxUB'></tbody>

                  <small id='zRxUB'></small><noframes id='zRxUB'>

                • <i id='zRxUB'><tr id='zRxUB'><dt id='zRxUB'><q id='zRxUB'><span id='zRxUB'><b id='zRxUB'><form id='zRxUB'><ins id='zRxUB'></ins><ul id='zRxUB'></ul><sub id='zRxUB'></sub></form><legend id='zRxUB'></legend><bdo id='zRxUB'><pre id='zRxUB'><center id='zRxUB'></center></pre></bdo></b><th id='zRxUB'></th></span></q></dt></tr></i><div id='zRxUB'><tfoot id='zRxUB'></tfoot><dl id='zRxUB'><fieldset id='zRxUB'></fieldset></dl></div>
                • 本文介绍了以编程方式添加时模糊 UILabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在将 UILabel 添加到用于加载目的的视图中.但是,添加后它变得模糊.奇怪的是,我在 UITableViewController 上加载的加载视图的代码几乎相同,并且在那里工作得很好.然而,UIViewController 之上的这个是模糊的.

                  I am adding a UILabel to a view meant for loading purposes. However, it gets blurry after I added it. The weird thing is that I just about the same code for an loading view which is loaded ontop of an UITableViewController and it works great there. Yet, this one on top of an UIViewController is blurry.

                  这是我的代码:

                  float x = (self.view.frame.size.width-20)/2;
                  float y = (self.view.frame.size.height-70)/2;
                  
                  // Add loading and sub text
                  UILabel *loadingText = [[UILabel alloc] initWithFrame:CGRectMake(10, round(y+30), round(self.view.frame.size.width-20), 21)];
                  [loadingText setTextAlignment:UITextAlignmentCenter];
                  [loadingText setNumberOfLines:0];
                  [loadingText setFont:[UIFont systemFontOfSize:17]];
                  [loadingText setText:NSLocalizedString(@"Please wait...
                  We are processing your request", @"LoadingPage")];
                  [loadingText sizeToFit];
                  [loadingText setBackgroundColor:[UIColor clearColor]];
                  [loadingText setCenter:self.view.center];
                  [loadingText setTag:2];
                  
                  [view addSubview:loadingText];
                  

                  推荐答案

                  你的标签很模糊,因为框架使用了浮点数.

                  Your label is blurry because the frame is using floating numbers.

                  要强制为你的框架设置整数值:

                  To force integers value for your frame just do :

                  [loadingText setFrame:CGRectIntegral(loadingText.frame)];
                  

                  您也可以将构成框架的所有值转换为 int,但 CGRectIntegral 会为您完成所有工作.

                  You could also cast all your values composing your frame to int, but CGRectIntegral does all the job for you.

                  这篇关于以编程方式添加时模糊 UILabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 iOS 中获取有关时区更改的通知 下一篇:如何将滑动手势添加到 UITableView 单元格?

                  相关文章

                  最新文章

                • <tfoot id='afxYs'></tfoot>

                    1. <legend id='afxYs'><style id='afxYs'><dir id='afxYs'><q id='afxYs'></q></dir></style></legend>

                      <small id='afxYs'></small><noframes id='afxYs'>

                      <i id='afxYs'><tr id='afxYs'><dt id='afxYs'><q id='afxYs'><span id='afxYs'><b id='afxYs'><form id='afxYs'><ins id='afxYs'></ins><ul id='afxYs'></ul><sub id='afxYs'></sub></form><legend id='afxYs'></legend><bdo id='afxYs'><pre id='afxYs'><center id='afxYs'></center></pre></bdo></b><th id='afxYs'></th></span></q></dt></tr></i><div id='afxYs'><tfoot id='afxYs'></tfoot><dl id='afxYs'><fieldset id='afxYs'></fieldset></dl></div>
                      • <bdo id='afxYs'></bdo><ul id='afxYs'></ul>