0

我想在我的 iPhone 应用程序中使用 UIGlassButton,我的视图控制器中有以下代码:

UIGlassButton *myButton = [[UIGlassButton alloc] initWithFrame:CGRectMake(2,2,316,50)];
[myButton addTarget:self action:@selector(myFunction:) forControlEvents:UIControlEventTouchDown];
[myButton setTitle:@"Neat button!" forState:UIControlStateNormal];
[myButton setTintColor:[UIColor colorWithWhite:0.20f alpha:1]];
[self.view addSubview:myButton];

我添加了指令@class UIGlassButton;在视图控制器的头文件中,但最终出现以下错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_UIGlassButton", referenced from:
   objc-class-ref in ControlViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
4

1 回答 1

1

UIGlassButton 不是 Apple 组件。它可能属于您需要导入的另一个自定义库。

于 2011-06-10T14:24:58.117 回答