Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. bool isProcessing = false;
  2. public override NSIndexPath WillSelectRow (UITableView tableView, NSIndexPath indexPath)
  3. {
  4. if(!isProcessing)
  5. return indexPath;
  6. return null;
  7. }
  8.  
  9. public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
  10. {
  11. isProcessing = true;
  12.  
  13. var data = GetDataAt(indexPath);
  14.  
  15. ProcessRowSelection(tableView, indexPath, data);
  16.  
  17. isProcessing = false;
  18.  
  19. }
  20.  
  21. public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
  22. {
  23. if(!isProcessing)
  24. {
  25. isProcessing = true;
  26. var data = GetDataAt(indexPath);
  27. ProcessRowSelection(tableView, indexPath, data);
  28. }
  29. else
  30. {
  31. isProcessing = false;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement