iOS development--a control cannot be seen when it is added.

Source: Internet
Author: User

A control is invisible to the naked eye, and what is possible

1. No instantiation of this control is created at all

2. No size set

3. the color of the control is the same as the background color of the parent control (it is actually displayed, but invisible to the naked eye)

4. Transparency Alpha <= 0.01

5.hidden = YES

6. not added to the parent control

7. blocked by other controls

8. wrong position

9. The parent control has the above situation

Special Circumstances

* Uiimageview does not set the Image property, or the picture name is not set

* UILabel text is not set, or the text color is the same as the background color of the parent control

* Uitextfield text is not set, or no border style is set BorderStyle

* Uipagecontrol does not set the total number of pages, does not display small dots

* UIButton Internal imageView and titlelabel frame have been tampered with, or ImageView and Titlelabel No content

* .....

suggestions for adding a control (debugging Tips):

1. It's best to set the background color and size

2. control colors Try not to be the same as the parent control's background color

iOS development--a control cannot be seen when it is added.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.