Why are there no tips when allocating an object in xcode?
题
For example:
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] init];
When I write UITapGestureRecognizer alloc
, there are no tips, so I have to write UITapGestureRecognizer
by myself, but it's a little long and time-consuming. Is there any way to solve this?
解决方案
This should auto complete by default? When you type =
always type in [];
first, then go back to type UITapGestureRecognizer alloc
.
Make sure your code completion is enabled by doing the following:
- Go to XCode Preferences
- Text Editing
- Tick "Suggest completions while typing"
其他提示
Type the opening bracket [
first before you type the class name. That way XCode knows you are expecting a class.
不隶属于 StackOverflow