gpt4 book ai didi

objective-c - iOS 中的预期标识符或 '('

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:59:30 25 4
gpt4 key购买 nike

我正在尝试遵循 Apple 的 iOS 核心数据教程,但无法克服此错误。

我已经尝试通过阅读此处的所有问题来解决这个问题,但一无所获 -

有什么想法吗?

#import <UIKit/UIKit.h>

UINavigationController *navigationController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, retain) UINavigationController *navigationController;
// expected identifier or '(' on the line above

@end

最佳答案

更好的解决方案——更改您的文本首选项以将 ctrl-return 绑定(bind)到实际的换行符。

我写了一个blog post with screenshots .


@jlehr 所说的,但有步骤。

  1. 转到声明 navigationController

    的行的末尾
  2. 点击 ctrl-a

如果光标移动到声明 window 的行的开头,则该行的换行符是伪造的。

快速修复;将光标放在声明 window 的行的开头,点击 down-arrow,然后 delete,然后 return .

我经常遇到这种情况,因为我对 emacs 根深蒂固,因此,点击 ctrl-return 会插入错误类型的换行符,导致编译器停止运行。请也提交错误,它会被标记为欺骗,但欺骗表明这让用户感到沮丧的频率。

关于objective-c - iOS 中的预期标识符或 '(',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14003494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com