objective-c – 在ios 5模拟器中使用时如何更改UIPageControl的颜色

栏目: Objective-C · 发布时间: 7年前

内容简介:翻译自:https://stackoverflow.com/questions/14622066/how-to-change-the-colour-of-the-uipagecontrol-when-used-in-ios-5-simulator

我在我的应用程序中使用以下代码: –

在.h文件中

@property (strong, nonatomic) IBOutlet UIPageControl *pageControl;

并在.m文件中

pageControl.currentPage = counting;

计数是NSInteger.应用程序工作正常,但UIPageControl设置为默认的白色,我无法通过属性检查器更改颜色

任何人都可以帮忙吗?……

在ios 6中,您可以这样做:
pageControl.pageIndicatorTintColor = [UIColor blueColor];
pageControl.currentPageIndicatorTintColor = [UIColor greenColor];

翻译自:https://stackoverflow.com/questions/14622066/how-to-change-the-colour-of-the-uipagecontrol-when-used-in-ios-5-simulator


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Agile Web Development with Rails 4

Agile Web Development with Rails 4

Sam Ruby、Dave Thomas、David Heinemeier Hansson / Pragmatic Bookshelf / 2013-10-11 / USD 43.95

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly. You concentrate on creating the application, and Rails takes care of the details. Tens of thousands of deve......一起来看看 《Agile Web Development with Rails 4》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具