After preprocessing the code
if (gesture.direction==UISwipeGestureRecognizerDirectionLeft)
as follows
if (gesture. 2==UISwipeGestureRecognizerDirectionLeft)
and this is obviously invalid code.
The solution is to put a unique namespace string in front of your #defines.
#define hariDirection 2
or
#define kDirection 2
Or imho better solution: don't use #define
typedef enum { heading = 1, direction, statement, refLink, correctResponse, incorrect1Response, } MyDirection;
This will do the same, but will not run into other method and variable names.
Matthias bauch
source share