WatchKit UIPageControl Dot Colour

2019-02-19 02:05发布

When I was watching one of the videos from Apple about the Apple Watch and its features I noticed that the page indicator dot colours change depending on the page presented.

They've also got images of the coloured dots within the Apple Watch Human Interface Guidelines App Anatomy section. Note the coloured title text as well.

enter image description here

Normally in WatchKit I would use the following snippet of code to do this:

let features = ["First", "Second", "Third"]
let controllers = [String](count: features.count, repeatedValue: "FeatureInterfaceController")
self.presentControllerWithNames(controllers, contexts: features)

Unfortunately as far as I know there isn't a way to access the currentPageIndicatorTintColor and pageIndicatorTintColor as you normally would as part of UIKit here (scroll down to Tint Color).

I wonder if Apple simply just added those colours for the video or whether they're actually going to be available as part of WatchKit in the future?

Perhaps I'm wrong and there is a way to change these dot colours.

enter image description here enter image description here enter image description here

1条回答
劳资没心,怎么记你
2楼-- · 2019-02-19 02:40

As written by an Apple Engineer in the Dev Forums, it's not possible to customize the color of the page control at this time.

Source: https://devforums.apple.com/message/1100695#1100695

查看更多
登录 后发表回答