Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.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 在TabBarController堆栈中嵌入UIPageControl_Ios_Uinavigationcontroller_Uipagecontrol - Fatal编程技术网

Ios 在TabBarController堆栈中嵌入UIPageControl

Ios 在TabBarController堆栈中嵌入UIPageControl,ios,uinavigationcontroller,uipagecontrol,Ios,Uinavigationcontroller,Uipagecontrol,我正在构建一个应用程序,它的顶层有一个TabBarController。其中一个选项卡中包含一个tableview,当选择一行时,我想转到一组5个视图,通过UIScrollViewDelegate和UIPageControl进行控制 我已经用UIScrollViewDelegate和UIPageControl构建了一个基本应用程序,它基于Derek Bredensteiner在以下回答中的代码: 它作为一个独立的应用程序运行良好,即:当通过以下方式直接从AppDelegate调用ViewCont

我正在构建一个应用程序,它的顶层有一个TabBarController。其中一个选项卡中包含一个tableview,当选择一行时,我想转到一组5个视图,通过UIScrollViewDelegate和UIPageControl进行控制

我已经用UIScrollViewDelegate和UIPageControl构建了一个基本应用程序,它基于Derek Bredensteiner在以下回答中的代码:

它作为一个独立的应用程序运行良好,即:当通过以下方式直接从AppDelegate调用ViewController代码时:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
但是当我试图从tableview代码调用相同的代码时,我得到了一个黑屏。我还尝试使用了presentModelViewController,得到了UIPageViewControl点,但其余的是黑色的

LearnPageViewController *phoneContentController = [[LearnPageViewController alloc] init] ;
//  [self presentModalViewController:phoneContentController animated:YES];
[self.navigationController pushViewController:phoneContentController animated:YES];

我通过添加一个新的windowproperty@property(nonatomic,retain)IBOutlet UIWindow*window使它工作;但这听起来不对。AppDelegate上有一个窗口属性,现在又有一个窗口属性降低了两层。

我通过添加一个新的窗口属性@property(nonatomic,retain)IBOutlet UIWindow*window,使它工作起来;但这听起来不对。AppDelegate上有一个窗口属性,现在又有一个窗口属性位于下两层。