캘린더가 바뀌었습니다.
let now = Date()
let calendar = Calendar.current
let now = Date()
let calendar = Calendar.current
calendar.component(.year, from: now)
UICalendarView ( NSDateComponents )
NSCalendar.currentCalendar < property
let calendarView = UICalendarView()
calendarView.delegate = self
calendarView.calendar = Calendar(identifier: .gregorian)
view.addSubview(calendarView)
func multiDateSelection(
_ selection: UICalendarSelectionMultiDate,
canSelectDate dateComponents: DateComponents
) -> Bool {
return myDatabase.hasAvailabilities(for: dateComponents)
}
페이지 컨트롤이란게 생겼네요.
pageControl.direction = .topToBottom
pageControl.preferredIndicatorImage = UIImage(systemNamed: "square")
pageControl.preferredCurrentIndicatorImage = UIImage(systemNamed: "square.fill")
sheet.detents = [
.large(),
.custom { _ in
200.0
}
]
Symbol에서 사용 가능합니다.
variableValue (property) -> 0 부터 1 까지
configuration (property) -> configuration 넣어주면 된다.
UIListContentConfiguration 사용 -> compositional Layout 사용시
알아서 변경합니다.
cell.contentConfiguration 로 접근 가능합니다.
UIkit 에서 SwiftUI 코드를 쓸 수 있네요.
cell.contentConfiguration = UIHostingConfiguration {
VStack {
Image(systemName: "wand.and.stars")
.font(.title)
Text("Like magic!")
.font(.title2).bold()
}
.foregroundStyle(Color.purple)
}