代码拉取完成,页面将自动刷新
code by swift 效果图:
#api:
internal func next()
internal func pre()
internal func setToday()
#使用说明: // // ViewController.swift // KeleCalendar // // Created by antz on 15/6/17. // Copyright (c) 2015年 antz. All rights reserved. //
import UIKit
class ViewController: UIViewController, KeleCalDelegate {
var kele:KeleCalMainView!
@IBOutlet weak var nextBtn: UIButton!
@IBOutlet weak var preBtn: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//println(cd.monthDateRange(NSDate()))
kele = KeleCalMainView()
kele.delegate = self
kele.render()
view.addSubview(kele)
}
func onCellRender(cell: KeleCalCellView, kdate: CalDateTimeVO) {
println("keleMain.onCellRender:\(kdate.year!)-\(kdate.month!)-\(kdate.day!)")
}
//---delegate
func onCellPressed(cell: KeleCalCellView, kdate: CalDateTimeVO) {
println("keleMain:\(kdate.year!)-\(kdate.month!)-\(kdate.day!)")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func onNextPressed(sender: AnyObject) {
kele.next()
}
@IBAction func onPrePressed(sender: AnyObject) {
kele.pre()
}
@IBAction func onTodayPressed(sender: AnyObject) {
kele.setToday()
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型