CGRect frame = CGRectMake(round((self.view.bounds.size.width-kImageWidth)/ 2.0), kTopPlacement,kImageWidth,kImageHeight); self.containerView = [[[UIView alloc] initWithFrame:frame] autorelease]; [self.view addSubview:self.containerView];在圖像中添加按鈕
// create the initial image view
frame = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight);
self.mainView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
self.mainView.image = [UIImage imageNamed:imagePath];
我想在mainview.image中放一個按鈕。我該怎麼做?
任何幫助將不勝感激。
它現在的工作!非常感謝!! – isarathg 2010-04-09 17:55:27