菜鸟教程小白 发表于 2022-12-13 05:55:53

ios - UITextField alpha 仅用于文本


                                            <p><p>我设置了 UITextField 的颜色:</p>

<pre><code>textField.backgroundColor = ;
textField.textColor = ;
textField.alpha = 0.5f;
</code></pre>

<p>为 bkg 和文本颜色设置了 Alphachannel 。
文字颜色如何单独设置alpha?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><pre><code>textField.textColor = ;
</code></pre>

<p>尝试设置 textColor alpha。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - UITextField alpha 仅用于文本,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/21073542/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/21073542/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - UITextField alpha 仅用于文本