- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
这里有人知道 setNeedsDisplay
是否会立即调用 drawRect
并立即更新屏幕吗?或者它只是一个排队的请求?谢谢。
最佳答案
View 直到下一个绘图周期才真正重绘。这只是通知系统应该重绘 View 。
您显然可以通过将内容模式设置为 UIViewContentModeRedraw
来完成此操作。我个人没有这样做过,但代码应该是这样的
UIView *redrawView = [[UIView alloc] initWithFrame:frame];
...
redrawView.contentMode = UIViewContentModeRedraw;
关于ios - setNeedsDisplay 是立即生效还是仅在稍后排队?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7177281/
我正在编写一个插件,有一个ajax调用向用户显示数据。 如果用户想在ajax成功时添加一些js?他可以从他的 js 脚本中做到这一点吗,比如定位这个 ajax 成功事件。 例如: $(documen
我有 html 代码,例如 - x 最初插入 div 'insert_calendar_eda_form'。 Javascript代码 calendar_eda_add
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 3 年前。 Improve this qu
我已经使用命令 sudo start myservice 启动了一个 upstart 服务。我想要一种方法,以便稍后我(或任何人)可以检查该服务是否已启动并正在运行。检查它的命令是什么? 最佳答案 找
我是一名优秀的程序员,十分优秀!