iPad 용 응용 프로그램을 만들고 있는데, UIPopoverController
에 속한 행에 대한 세부 공개 버튼을 가리키는 화살표가 표시됩니다. tableView:accessoryButtonTappedForRowWithIndexPath:
메소드에서이 작업을 수행하려고합니다. 현재 내가 더미 CGRect
와 함께이 있습니다 또한UITableViewCell의 세부 공개 버튼에서 UIPopoverController 표시
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
// Dismiss in the case it shows itself somewhere else
[addFeedPopup dismissPopoverAnimated:YES];
// Set up
TNSubscribeToFeedController *subscribeToFeedController = [[TNSubscribeToFeedController alloc] initWithNibName:@"SubscribeToFeed" bundle:nil];
UINavigationController *subscribeToFeedNavigationController = [[UINavigationController alloc] initWithRootViewController:subscribeToFeedController];
subscribeToFeedController.title = @"Subscribe to feed";
subscribeToFeedController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:nil];
subscribeToFeedController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:nil];
/*
* Note that we use the UINavigationController pure for the nices UINavigationBar.
*/
// Show in popup
addFeedPopup = [[UIPopoverController alloc] initWithContentViewController:subscribeToFeedNavigationController];
addFeedPopup.popoverContentSize = CGSizeMake(480, 320);
[addFeedPopup presentPopoverFromRect:CGRectMake(0, 0, 20, 20) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
// Memory
[subscribeToFeedNavigationController release];
[subscribeToFeedController release];
}
UITableView
가 편집 모드에있을 때 내 행을 설정하려면이를 사용하기 때문에, 상세 공개 버튼을 왼쪽으로 약 60 픽셀 :
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"SectionTwoCell"] autorelease];
}
cell.textLabel.text = [NSString stringWithFormat:@"Feed %d", indexPath.row];
cell.detailTextLabel.text = @"Description";
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.editingAccessoryType = cell.accessoryType;
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^//
// TWO LINES BACK DEAR SO USER //
누구든지이 문제를 해결할 수 있습니까? 감사.
아, 그리고 스크롤을 해제하고 UIPopoverController
이 (완벽)를 닫을 때까지 아무것도 선택하지 않도록하는 것도 가능하다?