<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          ISViewPagerViewPager 界面組件

          聯(lián)合創(chuàng)作 · 2023-09-27 10:11

          ISViewPager

          ViewPager 界面組件。用 Swift 編寫(xiě)的 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 = ["標(biāo)題一","標(biāo)題二","標(biāo)題三","標(biāo)題四","標(biāo)題五","標(biāo)題六","標(biāo)題七","標(biāo)題八","標(biāo)題九","標(biāo)題十"]
                  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>
          瀏覽 7
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产乱轮视频网站 | 成人免费看性爱大片密芽 | 一个色导航五月天伊人网站 | 黄色a电影 | 青青草免费视 |