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"

enter image description here

其他提示

Type the opening bracket [ first before you type the class name. That way XCode knows you are expecting a class.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top