UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)];
This code can compile for any simulator in Xcode 5,
but in Xcode 6, it can only compile for simulators with 32 bit CPUs(iPhone 5 and under),
when compiling for simulators with 64 bit CPUs(iPhone 5s, iPhone 6, iPhone plus), compiler says:
no visible @interface for 'UITapGestureRecognizer' declares the selector 'initWithTarget:action:'
But I do have imported <UIKit/UITapGestureRecognizer>
What's the problem?
Try Product
> Clean
menu first.(i.e. command + shift + k)
If it won't help, with option key, Product
> Clean Build Folder...
(i.e. option + command + shift + k).
At last, remove all derived data directory with rm -rf ~/Library/Developer/Xcode/DerivedData/
.
I think ~/Library/Developer/Xcode/DerivedData/ModuleCache/*
made with old (Xcode5) SDK causes this problem.
For me this started happenning when I updated to xCode GM, and only when 5s, 6, 6+ simulator is selected. All others are fine. Removing ~/Library/Developer/Xcode/DerivedData/ModuleCache solved it for me
I removed my Xcode 5 bundle and restarted my Mac, then magically it works now, I still don't know the reason however.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With