Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios在选项卡式应用程序中从UITableView启动Fgallery_Ios_Uitableview_View_Photo Gallery_Tabbed Interface - Fatal编程技术网

Ios在选项卡式应用程序中从UITableView启动Fgallery

Ios在选项卡式应用程序中从UITableView启动Fgallery,ios,uitableview,view,photo-gallery,tabbed-interface,Ios,Uitableview,View,Photo Gallery,Tabbed Interface,我正在尝试构建一个小应用程序。这是一款有3个标签的应用程序:照片、视频、文档 每个选项卡显示一个tableview,用于选择要显示的库、视频、文档;视频效果很好 我在照片库方面遇到了麻烦。我使用的Fgallery从样本中可以很好地工作: H 及 我真的不知道如何展示这个画廊。didSelectRowAtIndexPath是来自fgallery的路径,我试图修改它以显示viewm,但我是Objective-C的新手,我被卡住了 任何帮助或指导都将不胜感激 谢谢我补充道 if( indexPath.

我正在尝试构建一个小应用程序。这是一款有3个标签的应用程序:照片、视频、文档 每个选项卡显示一个tableview,用于选择要显示的库、视频、文档;视频效果很好

我在照片库方面遇到了麻烦。我使用的Fgallery从样本中可以很好地工作:

H 及

我真的不知道如何展示这个画廊。didSelectRowAtIndexPath是来自fgallery的路径,我试图修改它以显示viewm,但我是Objective-C的新手,我被卡住了

任何帮助或指导都将不胜感激

谢谢

我补充道

if( indexPath.row == 0 ) {
        NSLog( @"selection 1");

        localGallery = [[FGalleryViewController alloc] initWithPhotoSource:self];
// Create the navigation controller and present it modally.
        UINavigationController *navigationController = [[UINavigationController alloc]
                                                        initWithRootViewController:localGallery];
        [self presentModalViewController:navigationController animated:YES];

视图现在显示ok,但我缺少FGalleryViewController.m中的后退按钮,我将btn2添加到导航控制器

- (void)setUseThumbnailView:(BOOL)useThumbnailView
{
    _useThumbnailView = useThumbnailView;
    if( self.navigationController ) {
        if (_useThumbnailView) {
            UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"See All" style:UIBarButtonItemStylePlain target:self action:@selector(handleSeeAllTouch:)] ;
            [self.navigationItem setRightBarButtonItem:btn animated:YES];
            UIBarButtonItem *btn2 = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(dismissModalViewControllerAnimated:)] ;
            [self.navigationItem setLeftBarButtonItem:btn2 animated:YES];
        }
        else {
            [self.navigationItem setRightBarButtonItem:nil animated:NO];
        }
    }
}
瞧,我试图添加[self.view addSubview:localGallery.view];没有效果。我不理解观点的概念。。。
#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{
             NSLog( @"Choix Table");

    if( indexPath.row == 0 ) {
        NSLog( @"selection 1");

        localGallery = [[FGalleryViewController alloc] initWithPhotoSource:self];
        [self.navigationController pushViewController:localGallery animated:YES];  
    }
    else if( indexPath.row == 1 ) {
        networkGallery = [[FGalleryViewController alloc] initWithPhotoSource:self];
        [self.navigationController pushViewController:networkGallery animated:YES];
    ...
}
if( indexPath.row == 0 ) {
        NSLog( @"selection 1");

        localGallery = [[FGalleryViewController alloc] initWithPhotoSource:self];
// Create the navigation controller and present it modally.
        UINavigationController *navigationController = [[UINavigationController alloc]
                                                        initWithRootViewController:localGallery];
        [self presentModalViewController:navigationController animated:YES];
- (void)setUseThumbnailView:(BOOL)useThumbnailView
{
    _useThumbnailView = useThumbnailView;
    if( self.navigationController ) {
        if (_useThumbnailView) {
            UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"See All" style:UIBarButtonItemStylePlain target:self action:@selector(handleSeeAllTouch:)] ;
            [self.navigationItem setRightBarButtonItem:btn animated:YES];
            UIBarButtonItem *btn2 = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(dismissModalViewControllerAnimated:)] ;
            [self.navigationItem setLeftBarButtonItem:btn2 animated:YES];
        }
        else {
            [self.navigationItem setRightBarButtonItem:nil animated:NO];
        }
    }
}