【发布时间】:2011-01-26 19:01:45
【问题描述】:
简单地说,我已经在 UIView 中放置了带有 Interface Builder 的图像。现在我想在触摸该图像时运行一个方法/函数,例如在应该加载另一个图像时。
我的代码:
- (void)touchesended:(NSSet*) touches withEvent:(UIEvent *)event
{
// UITouch *touch = [touch anyObject];
bild_1_1.image = [UIImage imageNamed:@"t_1_4.jpg"];
}
【问题讨论】:
标签: objective-c iphone xcode uiimage touch