问题标签 [uisplitviewcontroller]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
objective-c - UISplitViewController 以编程方式没有 nib/xib
我通常在没有 IB 的情况下创建我的项目。我要做的第一件事是去掉所有对 xibs、网点更新 plist 等的引用。没问题,效果很好(在我的世界里)!
现在,我刚刚安装了 3.2 并尝试开发我的第一个 iPad 应用程序。按照与以前相同的过程,我创建了一个基于 UISplitView 的应用程序项目并剥离了所有 IB 材料。此外,我遵循了 Apple 参考文档中的部分:以编程方式创建拆分视图控制器,但是,主视图从未显示,只有详细视图(无论方向如何)。我真的试图仔细查看这一点,但我无法理解我错过了什么。
是否有 UISplitViewController 的工作示例没有笔尖漂浮在某处?我用谷歌搜索但找不到任何东西。或者你知道我可能错过了什么吗?
iphone - UISplitViewController 无法更改主视图控制器?
我正在尝试更改 UISplitViewController 中的主视图控制器(显示在纵向弹出窗口中,横向显示在左侧)。我想在作为两个不同 UIViewController 之一的主视图控制器之间切换(取决于在我的应用程序其他地方采取的操作)。
我正在使用以下内容:
mySplitViewController.viewControllers = [NSArray arrayWithObjects:newMasterController, detailController, nil];
正如您在横向模式下所期望的那样,这会正确更改主视图控制器。然而,它似乎并没有改变纵向模式下用于弹出框的视图控制器。
我注意到显示此主视图控制器的 barbuttonitem 只是在 splitviewcontroller 上调用 showMasterInPopover:,因此希望它也可以在纵向模式下工作,但事实并非如此。
事实上,我可以设置主视图控制器,在横向模式下正确看到新的视图控制器,旋转回纵向,弹出窗口中使用的视图控制器仍然是旧的。
这是一个错误吗?
ipad - UINavigationController + UITableView + UISearchBar + UISplitViewController
我有一个烦人的问题。我的 UISplitViewController 的主(左)窗格中有一个带有 UITableView 的 UINavigationController。当我进行正常操作时,事情会顺利推进到导航控制器。
替代文字 http://files.droplr.com/files/8851942/WDO5y.working.jpg
但是,当我进行搜索并推送内容时,就好像它没有考虑导航栏所需的空间。它将新控制器推到最顶部,然后打开导航栏,重叠内容!
替代文字 http://files.droplr.com/files/8851942/WDRem.search.jpg
我应该在纵向(在弹出菜单中)和 iphone 上添加它时效果很好。这是一个 UISplitViewController 错误吗?
ipad - Problem after dismissing a modal view used in conjunction with a uisplitviewcontroller
I'm having a hard time understanding why the following is happening (and how to fix it).
I've created an application using the split-view based application.
I've added a UiBarButtonItem called showTheModal which calls this method found in RootViewController.m:
The BarButtonItem of course, is shown at the bottom of the Default Root Controller (left side of the of the split view in landscape) or at the bottom of the popup (if in landscape).
The modal view is dismissed by a button placed in a toolbar. It calls the following:
The problem I'm having is if rotate the screen, while the modal is up. Here is what happens in different scenarios (start refers to the orientation when the showTheModal button is hit, end refers to the orientation when I hit the dismissModal button).
1)Start landscape, end landscape: Everything appears fine. willHideViewController and willShowViewController methods are not called in the RootViewController (as expected)
2) Start landscape, end portrait: UI appears fine. willHideViewController is run TWICE (WHY?)
3) Start portrait, end portrait: UI appears fine. willHideViewController is run once (as expected)
4) Start portrait, end landscape: The 'Root List' button remains in the detail view (right side of the split view. Neither willHideViewController and willShowViewController are invoked (WHY??)
Any thoughts as to why #2 and #4 don't behave quite the expected way?
iphone - 如何制作以编程方式使用 UISplitViewController 和 UINavigationController 的通用 iPhone / iPad 应用程序?
我无法在任何地方找到一个好的答案。我正在为我的 iPhone 应用程序使用 UINavigationController,所有内容都是以编程方式生成的,在 Interface Builder 中没有任何内容。我正在尝试使用 UISplitViewController 和现有的 UINavigationController 将我的应用程序移植到 iPad,但我不确定我的程序逻辑应该在哪里分离 iPhone 或 iPad 的视图控制器。
我是否将我的主文件设置为使用不同的应用程序委托,或者我是否使用相同的应用程序委托并在其中有条件地设置用户界面?
除此之外,每当我尝试在模拟器上编译我的应用程序时,它都无法识别 UISplitViewController,甚至无法识别我检查类是否存在的条件。
请有人把我引向正确的方向,记住我没有使用任何 xibs 吗?
iphone - 为什么我的 UITableView 没有出现在正确的滚动位置?
我有一个基于拆分视图的应用程序,它呈现一个主从界面,并在纵向模式下使用弹出框来呈现主列表。弹出框展示了一个分段的表格视图,最终由NSFetchedResultsController
. 我可以点击工具栏按钮来显示主列表,滚动到任意行,然后点击该行以关闭弹出框。
我的问题是,如果表格滚动到第二部分的顶部,当我关闭弹出窗口然后点击工具栏按钮重新呈现它时,表格的滚动位置始终设置为第二部分的第一行部分位于列表顶部。如果我没有滚动到第二部分的顶部,它会在表格再次出现时正确地记住它的滚动位置。
同样,在横向模式下,如果我将表格滚动到第三部分的顶部,然后旋转到纵向,当我回到横向时,滚动位置始终设置为第三部分的第一行位于顶部名单。
我尝试-scrollToNearestSelectedRowAtScrollPosition:animated
在主视图控制器-viewWillAppear
和拆分视图委托中调用,但均splitViewController:popoverController:willPresentViewController:
无效。有人知道我可能做错了什么吗?
ipad - TabBar 中的多个 UISplitviewControllers 不会全部通知旋转事件
我有一个包含 3 个 UISplitViewControllers 的 tabBar 的应用程序。除了一种情况外,一切都运行良好:
我在tab1上有横向位置的ipad。我点击tab3,然后我旋转ipad纵向模式。我点击tab1,它在竖屏模式下显示得很好,我很高兴。
我现在回到横向位置。
我再次单击 tab3 并在那里,splitView 控制器仍以“纵向模式”显示。我在 tab3 中的 splitviewController 的代表从未被调用过。
有没有办法在“viewWillAppear”中强制旋转这个 splitViewController?
iphone - 为什么 SplitView iPhone 模板没有 RootView 的 nib 文件?
我正在深入研究 iPad 开发,并且学得很快,但无论我在哪里,我都有疑问。使用模板在 Xcode 中创建新的 SplitView 应用程序后,它会生成 AppDelegate 类、RootViewController 类和 DetailViewController 类。除此之外,它还会为 MainWinow.xib 和 DetailView.xib 创建一个 .xib 文件。
- 这五个文件如何协同工作?
- 为什么 DetailView 有 nib 文件,而 RootView 没有?
- 当我双击 MainWindow.xib 文件时,Interface Builder 启动时没有“查看”窗口,为什么?
下面是
didFinishLaunchingWithOptions
AppDelegate 类中方法的代码。为什么我们将 splitViewController 添加为子视图?}
非常感谢您的所有帮助!我还有很多东西要学,所以如果这个问题有任何荒谬之处,我深表歉意。我现在要继续研究这些问题!
iphone - How do I add a custom view to iPhone app's UI?
I'm diving into iPad development and I'm still learning how everything works together. I understand how to add standard view (i.e. buttons, tableviews, datepicker, etc.) to my UI using both Xcode and Interface Builder, but now I'm trying to add a custom calendar control (TapkuLibrary) to the left window in my UISplitView application which doesn't involve Interface Builder, right? So if I have a custom view (in this case, the TKCalendarMonthView), how do I programmatically add it to one of the views in my UI (in this case, the RootViewController)? Below are some relevant code snippets from my project...
RootViewController interface
TKCalendarMonthView interface
Thanks in advance for all your help! I still have a ton to learn, so I apologize if the question is absurd in any way. I'm going to continue researching this question right now!
xcode - 在 iPad SplitView 模板中,指定要在 SplitView 中使用哪些视图的代码在哪里?
在 iPad Programming Guide 中,它提供了以下代码示例,用于指定将在 SplitView 中使用的两个视图(firstVC 和 secondVC)...
但是当我在 Xcode 中实际创建一个新的 SplitView 项目时,我看不到任何代码表明应该将默认 rootView 和 detailView 视图添加到 SplitView。我在哪里可以找到那个?
我是 iPhone OS 编程的新手,我只是想了解这一切是如何工作的。提前感谢您的所有帮助!我现在将继续研究这个问题。