自定义UI分页控件
我已经实现了 UIPaging 控件,现在我想用图像点替换默认点。我怎样才能做到这一点。
I have implemented a UIPaging control and now i want to replace the default dots by image dots. How can i do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看看这个 UIPageControl 扩展
https://github.com/simonmaddox/SMPageControl
它将允许您为点着色,但是您可以轻松地适应在重写的drawRect方法中处理图像
Take a look at this extension to UIPageControl
https://github.com/simonmaddox/SMPageControl
It will allow you to colour the dots, however you could easily adapt to handle images in the overriden drawRect method
Uipagecontrol 不执行任何操作。您可以使用其中包含图像视图的滚动视图,并使用滚动视图委托。
文档:
UIScrollView 类参考
< a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollViewDelegate_Protocol/Reference/UIScrollViewDelegate.html" rel="nofollow">UIScrollViewDelegate 协议参考
Uipagecontrol does nothing. You can use an scroll view with image views in it and use scroll view delegates.
Docs:
UIScrollView Class Reference
UIScrollViewDelegate Protocol Reference