ios - 连续请求出现相同的数据,求解。
迷茫
迷茫 2017-04-17 17:52:41
0
1
290

选择好发票点击确定,然后会跳转到添加好的页面。

但是真机测试会出现一个问题,选好内容后快速的多次点击确定,会出现两条相同的数据。

但是已经做了判断

还是会出现重复情况,加了一行代码 ,希望延迟0.5秒再操作。

[self performSelector:@selector(GoToNext) withObject:nil afterDelay:0.5f];

还是不起作用,求解。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
左手右手慢动作

1. After clicking the OK button, immediately set the OK button to a non-clickable state and do not release it until it is completed.
2. "Two identical data will appear" - what does this refer to, is it stored in the database?

  • If it is stored in a database, you can control it so that the second duplicate item is not added.

  • If it is a network request, cancel the first one when sending the second request.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template