【发布时间】:2011-07-19 15:17:02
【问题描述】:
我有一个 IBOutlet 集合的数组
.h
@interface UpisiRezultat : UIViewController {
NSArray *buttons;
}
@property (nonatomic, retain) IBOutletCollection(UIButton) NSArray *buttons;
.m
@synthesize buttons;
- (void)viewDidLoad
{
[self setValue:[UIFont fontWithName:@"NeverSayNever" size:22] forKeyPath:@"buttons.font"];
[super viewDidLoad];
}
- (void)viewDidUnload
{
buttons = nil;
}
- (void)dealloc
{
[buttons release]; --> Error
[super dealloc];
}
为什么当我有[按钮释放]时我的程序会崩溃;在交易中? 没有它,它不会崩溃...
【问题讨论】: