ViewPager 界面组件 ISViewPager

码农软件 · 软件分类 · 高级UI组件(Advanced) · 2019-07-11 18:28:29

软件介绍

ISViewPager

ViewPager 界面组件。用 Swift 编写的 iOS 的 ViewPager UI。

![image](https://github.com/invictus-lee/ISViewPager/blob/master/viewpager.gif)

支持

  • Xcode8.0

  • Swfit3.0 (Objective-C Not Supported)

  • iOS7.0

  • Device Support: Universal

  • Device Orientaion Support:All

使用方式

<pre code>
 class ViewPager:UIViewController{
    init(title:String) {
        super.init(nibName: nil, bundle: nil)
        self.title = title
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        let label = UILabel.init(frame: CGRect(x: self.view.frame.width/2-50, y: self.view.frame.height/2-100, width: 100, height: 50))
        label.text = title
        label.textAlignment = NSTextAlignment.center
        self.view.addSubview(label)
    }
}
/*********************************************************/
  let titles = ["标题一","标题二","标题三","标题四","标题五","标题六","标题七","标题八","标题九","标题十"]
        var viewPages = [ViewPager]()
        for title in titles{
            let viewpage = ViewPager(title:title)
            viewPages.append(viewpage)
        }
        let pagesOptions:[UIViewPagerOption] = [
            .TitleBarHeight(50),
            .TitleBarBackgroudColor(UIColor.white),
            .TitleBarScrollType(UIViewPagerTitleBarScrollType.UIViewControllerMenuScroll),
            .TitleFont(UIFont.systemFont(ofSize: 15, weight: 2)),
            .TitleColor(UIColor.black),
            .TitleSelectedColor(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1)),
            .TitleItemWidth(90),
            .IndicatorColor(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1)),
            .IndicatorHeight(5),
            .BottomlineColor(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1)),
            .BottomlineHeight(1)
        ]
        let pages = ISViewPagerContainer(titles: titles, viewPages:viewPages,options: pagesOptions)
        pages.view.backgroundColor = UIColor.white
        let baseVc = UINavigationController(rootViewController: pages)
</pre code>

事件处理

<pre code>
    public func didScrollToPage(index:UInt){
    }
    public func didScorllToLeftEdage(){
    }
    public func didScorllToRightEdage(){
    }
   </pre code>

本文地址:https://www.codercto.com/soft/d/9918.html

数学与泛型编程

数学与泛型编程

[美]亚历山大 A. 斯捷潘诺夫(Alexander A. Stepanov)、[美]丹尼尔 E. 罗斯(Daniel E. Rose) / 爱飞翔 / 机械工业出版社 / 2017-8 / 79

这是一本内容丰富而又通俗易懂的书籍,由优秀的软件设计师 Alexander A. Stepanov 与其同事 Daniel E. Rose 所撰写。作者在书中解释泛型编程的原则及其所依据的抽象数学概念,以帮助你写出简洁而强大的代码。 只要你对编程相当熟悉,并且擅长逻辑思考,那么就可以顺利阅读本书。Stepanov 与 Rose 会清晰地讲解相关的抽象代数及数论知识。他们首先解释数学家想要解决......一起来看看 《数学与泛型编程》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

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

HEX CMYK 互转工具