iOS Learning Note 01

Source: Internet
Author: User

# # HUD

-Other sayings: indicator, cover, mask

-Translucent HUD Approach

-Background color set to translucent color

# # Timed Tasks

-Method 1:performselector

"' OBJC

Automatically call Self's Hidehud method after 1.5s

[Self performselector: @selector (Hidehud) Withobject:nil afterdelay:1.5];

```

-Method 2:GCD

"' OBJC

Dispatch_after (Dispatch_time (Dispatch_time_now, (int64_t) (1.5 * nsec_per_sec)), Dispatch_get_main_queue (), ^{

The code inside the block is automatically executed after 1.5s

Self.hud.alpha = 0.0;

});

```

-Method 3:nstimer

"' OBJC

Automatically call Self's Hidehud method after 1.5s

[Nstimer scheduledtimerwithtimeinterval:1.5 target:self selector: @selector (Hidehud) Userinfo:nil Repeats:no];

Repeats if yes, means that the self's Hidhud method is called every 1.5s

```

# # FAQs

-An. m file inside the project is not available

-Check: Build phases-Compile Sources

-A resource file within the project (such as plist, audio, etc.) cannot be used

-Check: Build phases Copy Bundle Resources

# # Model

-What is a model?

-objects that are designed to hold data

-Generally are pure objects that inherit directly from NSObject

-some properties are provided internally to hold the data

# # What is the possibility that a control can't see?

-the width or height is actually 0.

-Incorrect position (for example, a negative number or an oversized count that has exceeded the screen)

-Hidden = = YES

-Alpha <= 0.01

-No background color set, no content set

-may be text and background color

iOS Learning Note 01

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.