Better input handling and UIButton actions