I'm working through CS193P_SPR16 Developing iOS Apps with Swift on iTunes U. The professor, Paul Hegarty, is great. I'm enjoying this a lot. However, I've run into a dead end.
I have two questions:
1. In general, how does one go about solving this kind of problem? I can solve problems where the code doesn't behave properly but in this case it seems like I'm doing the right thing but Xcode doesn't recognize it.
2. Is there a better place to track down this kind of question?
The dead end is this:
I'm following along with the app the professor is developing as an example. Everything works find up till now and Xcode reports no issues. I can build the app and test it in the simulator.
The next step is to add pinch recognition.
I start typing"fac" and Xcode immediately recognizes
faceView so I type return then a ".a" and Xcode immediately offers me
faceView.addGestureRecognizer(<#T##gestureRecognizer:
UIGestureRecognizer##UIGestureRecognizer#>)
This is good so I press return and now I can enter the argument. So far this is exactly what I see in the professor's demo.
I start typing "UI" and Xcode offers many choices.
I get to "UIP" and now there are no choices. In the professor's video Xcode should offer:
UIPinchGestureRecognizer among other similar choices
as an option but now I have no options. So now I am stumped. I am happy to track this down but I need a hint about how to proceed. It recognized faceView as being declared in an Outlet. It knew that addGestureRecognizer was attached to that. According to the documentation UIPinchGestureRecognizer is a concrete subclass so why doesn't it appear?
Thanks.
I have two questions:
1. In general, how does one go about solving this kind of problem? I can solve problems where the code doesn't behave properly but in this case it seems like I'm doing the right thing but Xcode doesn't recognize it.
2. Is there a better place to track down this kind of question?
The dead end is this:
I'm following along with the app the professor is developing as an example. Everything works find up till now and Xcode reports no issues. I can build the app and test it in the simulator.
The next step is to add pinch recognition.
I start typing"fac" and Xcode immediately recognizes
faceView so I type return then a ".a" and Xcode immediately offers me
faceView.addGestureRecognizer(<#T##gestureRecognizer:
UIGestureRecognizer##UIGestureRecognizer#>)
This is good so I press return and now I can enter the argument. So far this is exactly what I see in the professor's demo.
I start typing "UI" and Xcode offers many choices.
I get to "UIP" and now there are no choices. In the professor's video Xcode should offer:
UIPinchGestureRecognizer among other similar choices
as an option but now I have no options. So now I am stumped. I am happy to track this down but I need a hint about how to proceed. It recognized faceView as being declared in an Outlet. It knew that addGestureRecognizer was attached to that. According to the documentation UIPinchGestureRecognizer is a concrete subclass so why doesn't it appear?
Thanks.