iOS技术交流收藏程序员iOS Developer

UI常见问题(二)

2016-07-27  本文已影响95人  阿拉斯加的狗

九宫格计算思路

HUD

定时任务

// 1.5s后自动调用self的hideHUD方法
[self performSelector:@selector(hideHUD) withObject:nil afterDelay:1.5];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    // 1.5s后自动执行这个block里面的代码
    self.hud.alpha = 0.0;
});
// 1.5s后自动调用self的hideHUD方法
[NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(hideHUD) userInfo:nil repeats:NO];
// repeats如果为YES,意味着每隔1.5s都会调用一次self的hidHUD方法

常见问题

模型

一个控件看不见有哪些可能?

上一篇下一篇

猜你喜欢

热点阅读