【发布时间】:2011-01-18 12:26:12
【问题描述】:
您好,我有一个问题,我无法为函数发送参数
-(IBAction)ukazObrat:(NSInteger *)cis {
stvrtyViewController *screen = [[stvrtyViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screen animated:YES];
screen.obratLabel.font = [UIFont systemFontOfSize: 12];
screen.obratLabel.numberOfLines = 0;
screen.obratLabel.text = [array objectAtIndex:cis];
[screen release];
}
我将此函数设置为一个按钮单击,但是当我向它添加参数时我无法编译它。
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button.titleLabel setLineBreakMode:UILineBreakModeWordWrap];
[button.titleLabel setTextAlignment:UITextAlignmentLeft];
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[button setTitle:obratLable forState:UIControlStateNormal];
[button addTarget:self
action:@selector([self ukazObrat:minus]
forControlEvents:UIControlEventTouchDown];
button.frame = CGRectMake(0.0, 0.0, 250.0, 60.0);
在我添加变量之前它一直在工作。 请帮忙
【问题讨论】:
标签: objective-c cocoa-touch ios uibutton