我的tableView與指示燈,但是當我在按鈕點擊顯示SMaL公司popwindow形象我想,圖像應該與細胞排列如果單擊的單元格位於頂部,然後彈出窗口應顯示在頂部如果細胞clciked是middel那麼根據。如何的圖片瀏覽位置設置的UITableViewCell的中心在iPhone
現在我有一個在固定的位置在屏幕上。
我要讓像正常的iPad應用程序,當你按下然後任意單元格按鈕,彈出addtoFave的按鈕與該小區神韻:任何想法如何完成這件事。
這裏是我當前的代碼:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"ContentID %@",contentID);
CustomCell *cell = (CustomCell *) [tblSimpleTable cellForRowAtIndexPath:indexPath];
UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 312, 105)];
imgView.frame = CGRectMake((cell.frame.size.width/2)-(imgView.frame.size.width/2), (cell.frame.size.height/2)-(imgView.frame.size.height/2), 312, 105);
imgView.image=[UIImage imageNamed:@"popupj.png"];
[cell addSubview:imgView];
}
但是這顯示了在小區中的一個並非所有圖像時,我當我在其他小區點擊此圖片顯示在第一個單元格單擊僅我想,哪個單元選擇這應該顯示給那個單元格。
你的問題不明確。放一些代碼或更多的信息,這將幫助你。 –
你想顯示彈出窗口,你點擊單元格,是這樣嗎? – Mital
@Mital你是對的我想這樣,因爲你要求 –