简单的 UILabel 出错?
我有一个小问题:
我在主窗口中有一个带有视图控制器和选项卡控制器的视图。
- (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 技术交流群。

这是一个解决方案,非常基本和简单,但也非常令人沮丧:
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