3
我怎麼能錨的功能,我的按鈕,我創造了這樣錨UIButton的函數編程
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.titleLabel.font = [UIFont systemFontOfSize: 12];
button.titleLabel.lineBreakMode = UILineBreakModeTailTruncation;
button.titleLabel.shadowOffset = CGSizeMake (1.0, 0.0);
[button addTarget:self
action:@selector(aMethod:)
forControlEvents:UIControlEventTouchDown];
button.frame = CGRectMake(80.0, 160.0, 160.0, 40.0);
[button setTitle:string forState:UIControlStateNormal];
[self.view addSubview:button];
我想這樣做similliar因爲它做IB,當我鏈接功能的按鈕。 這可能嗎? 感謝您的幫助
非常感謝它所做的一切 – Csabi 2011-01-14 13:13:23