我试图通过ViewController
UIView
的时间
但是,UILongPressGestureRecognizer
的状态为press:UILongPressGestureRecognizer
,.began
,.end
,.cancelled
。
但是,我试图知道是否按.changed
秒来改变对x
的控制。
我目前的代码是:
UIView
但是,我找不到知道按下时间的方法。 有办法吗?
答案 0 :(得分:0)
长按开始时,请记下时间(开始)。取消,结束或失败时;可选择计算从开始的秒数。如果印刷机持续时间超过5秒,则myView为红色。
1. Modify two configure files
# vi /var/lib/pgsql/data/postgresql.conf
Replace the line:
listen_addresses = 'localhost' -> listen_addresses = '*'
# vi /var/lib/pgsql/data/pg_hba.conf
Add the line at the very end:
host all all 0.0.0.0/0 trust
(If IPv6:
host all all ::/0 trust)
2. Restart the database service
# service postgresql restart
3. Disable the firewall
# rcSuSEfirewall2 stop
# chkconfig SuSEfirewall2 off
# chkconfig SuSEfirewall2_init off