https://github.com/WenchaoD/FSCalendar
import UIKit
import FSCalendar
class ViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSource {
@IBOutlet weak var calendar: FSCalendar!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
calendar.cellShape = .Rectangle//์ ํ๋ ๋ ์ง์ ํํ๊ฐ ๋ค๋ชจ๋ก ํ์๋๋๋ก
calendar.allowsMultipleSelection =true //์ฌ๋ฌ๋ ์ง๋ฅผ ๋์์ ์ ํํ ์ ์๋๋ก
calendar.clipsToBounds =true //๋ฌ๋ ฅ ๊ตฌ๋ถ ์ ์ ๊ฑฐ
calendar.delegate =self
calendar.dataSource =self
}
// ๊ฐ ๋ ์ง์ ํน์ ๋ฌธ์์ด์ ํ์
func calendar(calendar: FSCalendar, subtitleForDate date: NSDate) ->String? {
return "W"
}
// ํน์ ๋ ์ง๋ฅผ ์ ํํ์ ๋, ๋ฐ์
func calendar(calendar: FSCalendar, didSelectDate date: NSDate) {
print(date)
}
// ์ค์์ดํ๋ฅผ ํตํด์ ๋ค๋ฅธ ๋ฌ(month)์ ๋ฌ๋ ฅ์ผ๋ก ๋์ด๊ฐ ๋ ๋ฐ์ํ๋ ์ด๋ฒคํธ ์ฒ๋ฆฌ.
func calendarCurrentMonthDidChange(calendar: FSCalendar) {
print(calendar)
}
}
'Develop Study ๐ป' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
TCP/IP ์์ผํ๋ก๊ทธ๋๋ฐ 2 (0) | 2020.04.17 |
---|---|
TCP/IP ์์ผํ๋ก๊ทธ๋๋ฐ on MAC (0) | 2020.04.10 |
swift study (0) | 2019.11.04 |
swift fastcampus ์๊ฐ์ค (0) | 2019.10.30 |
flutter (0) | 2019.09.25 |