私はを使用していますUIButton
。クリックすると、の助けを借りて自分のNSMutableArray
中に存在するコンテンツを表示したいと思います。つまり、セルに自分のコンテンツを表示するポップアップを表示したいと思います。UITableView
UIPopOverController
UITableView
NSMutableArray
次のコード行を使用しています。
UITableViewController *table= [[UITableViewController alloc]init];
table.delegate = self;
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:table];
self.popoverController = popover;
popoverController.delegate = self;
NSString *hDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *hFilePath = [hisDir stringByAppendingPathComponent:@"hhhh.txt"];
NSArray *array = [NSArray arrayWithContentsOfFile:hFilePath ];
NSMutableArray *kkkk = [[NSMutableArray alloc] init];
for (NSDictionary *dict in array) {
[kkkk addObjectsFromArray:[dict allKeys]];
}
table = [[UIImageView alloc] initWithFrame:[window bounds]];
// Set up the image view and add it to the view but make it hidden
[window addSubview:table];
table.hidden = YES;
[window makeKeyAndVisible];
UITableView
のプレスでをポップアップさせることができませんUIButton
。誰かが私がそれを整理するのを手伝ってもらえますか?