Editor placeholder in source code错误

When you insert code via autocompletion (or via a code snippet, sometimes), there may be placeholders — blue rectangles that describe what you should put there instead. You can click on a placeholder to select it, then type your actual code.

For example (I'm guessing) when you typed "UIView(", you inserted a complete call, but with a "CGRect" placeholder where the rect was supposed to go. If you put the rect parameters after the placeholder without replacing it, you'd get this error message. You should have replaced the placeholder, not used it as code.

If that's what happened, you don't have to actually retype it in this case. If you double-click on a placeholder (or select it and press Enter), it will change to regular text.

自动补齐的时候双击即可。

原文地址:https://www.cnblogs.com/hustdc/p/11631354.html