Latest 0.0.6
Homepage https://github.com/JasonYaoSiXu/YSXChooseTime_Swift
License Copyright (c) 2017年 YaoSiXu. All rights reserved.
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

时间选择器


pod search YSXChooseTime_Swift or pod ‘YSXChooseTime_Swift’, ‘~> 0.0.6’ in your Podfile

use it like this

  let datePicker = DateScrollView(frame: CGRect(x: 0, y: 100, width: self.view.bounds.size.width, height: 60))
  datePicker.backgroundColor = UIColor.cyan
  datePicker.chooseDelegate = self

the chooseDelegate type is DateScrollViewChooseDateItemDalegate.
It has three methods, they are must be implementation。

 // the date is Greenwich time 
 func getNormlDate(date: Date)
 // the date is the user's system time
 func getLocationGMTDate(date: Date)
 // dateInfo is a tuples, dateInfo.0 is the year,dateInfo.1 is the month, dateInfo.2 the day of the week,
 // 1 is monday 7 is sunday, dateInfo.3 is the day of the month
 func getDateInto(dateInfo: (Int, Int, Int, Int))

Because the DateScrollView inherit from UIScrollView,so you must set the UIViewController.automaticallyAdjustsScrollViewInsets = false

choose
nochoose

You can set the DateScrollView backgroundcolor 、 the choose view Color and the dateLabel’s textColor

Latest podspec

{
    "name": "YSXChooseTime_Swift",
    "version": "0.0.6",
    "summary": "u65f6u95f4u9009u62e9u5668",
    "description": "u65f6u95f4u9009u62e9u5668uff0cu9009u62e9u4e00u4e2au65e5u671fuff0cu8fd4u56deu8be5u65e5u8d77u6240u5728u7684u5e74u3001u6708u3001u4ee5u53cau662fu5468u51e0",
    "homepage": "https://github.com/JasonYaoSiXu/YSXChooseTime_Swift",
    "license": "Copyright (c) 2017u5e74 YaoSiXu. All rights reserved.",
    "authors": {
        "yaosixu": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/JasonYaoSiXu/YSXChooseTime_Swift.git",
        "tag": "0.0.6"
    },
    "source_files": "YSXChooseTime_Swift/**/*.{h,m,swift}",
    "frameworks": "UIKit",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This