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