简单的 UILabel 出错?

发布于 11-28 03:08 字数 836 浏览 3 评论 0原文

我有一个小问题:

我在主窗口中有一个带有视图控制器和选项卡控制器的视图。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:     (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Add the tab bar controller's current view as a subview of the window

self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

在这个视图上我有大约 10 个标签。

一旦我将 Interface-Builder 上的 1 Label 与控制器中的 UILabel 连接起来,我就会收到 SIGBART 错误。

这是我的代码:

#import <UIKit/UIKit.h>

@interface SelfViewController : UIViewController
{
    IBOutlet UILabel *id2;
    IBOutlet UILabel *username;
    IBOutlet UILabel *vorname;
    IBOutlet UILabel *nachname;
    IBOutlet UILabel *email;
}

@end

我做错了什么?

I have a little problem:

I have a view with a view controller and a tabbarcontroller in a main window.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:     (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Add the tab bar controller's current view as a subview of the window

self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

On this view I have around 10 Labels.

As soon as I connect 1 Label on the Interface-Builder with the UILabel in the controller, I get a SIGBART error.

Here is my code:

#import <UIKit/UIKit.h>

@interface SelfViewController : UIViewController
{
    IBOutlet UILabel *id2;
    IBOutlet UILabel *username;
    IBOutlet UILabel *vorname;
    IBOutlet UILabel *nachname;
    IBOutlet UILabel *email;
}

@end

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你是我的挚爱i2024-12-05 03:08:46

这是一个解决方案,非常基本和简单,但也非常令人沮丧:
https://discussions.apple.com/thread/1598422?threadID=1598422

Here is a solution, very basic and simple but very frustrating too:
https://discussions.apple.com/thread/1598422?threadID=1598422

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文