【问题标题】:Where is PageControl contained in UIPageViewController referenced to?UIPageViewController 中包含的 PageControl 引用到哪里?
【发布时间】:2015-05-03 05:46:01
【问题描述】:

我想将 UIPageViewController 中呈现的 UIPageControl 的高度从对象库拖到我的情节提要中。

它在故事板的 UIPageViewController 中既不可见(所以我不能通过 Ctrl 拖动来制作出口),也没有在 UIPageViewController 类参考中描述?

那么我怎样才能获得对 UIPageControl 对象的引用呢?

即使在情节提要中可访问的文档大纲(如@sasquatch 所指出的那样,单击情节提要左下角的小按钮时出现)也没有列出 UIPageControl 对象。这是呈现的内容:

【问题讨论】:

  • 您是否掌握了如何使用它?我只是被同样的事情困住了......
  • @Voyteck 你得到参考了吗?

标签: ios uipageviewcontroller uipagecontrol


【解决方案1】:

使用 Swift 2.2 应该可以工作。

UIPageControl.appearance()

UIPageControl 符合 UIAppearnce 协议并有权访问此方法。

这在技术上是 UIPageControls“外观代理”,但应该适合你。

您可以在此处阅读更多相关信息: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAppearance_Protocol/index.html#//apple_ref/occ/intfcm/UIAppearance/appearance

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-03
    • 1970-01-01
    • 2019-08-02
    • 1970-01-01
    • 2012-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多