Skip to content

Instantly share code, notes, and snippets.

func isLeap(year: Int) -> Bool {
let isDivisibleBy4 = year % 4 == 0
let isDivisibleBy100 = year % 100 == 0
let isDivisibleBy400 = year % 400 == 0
let isLeapYear = (isDivisibleBy4 && !isDivisibleBy100) || ( isDivisibleBy4 && isDivisibleBy400)
return isLeapYear
}
@DominikPetho
DominikPetho / 0-InfinitePageView for SwiftUI.md
Created January 23, 2024 16:34 — forked from beader/0-InfinitePageView for SwiftUI.md
Create a InfinitePageView for SwiftUI using UIViewControllerRepresentable by the help of ChatGPT

InfinitePageView for SwiftUI

Create a Bi-directional Infinite PageView for SwiftUI using UIViewControllerRepresentable & UIPageViewController by the help of ChatGPT.

Checkout the video demo in the comment.

The code is generated by ChatGPT through multiple rounds of conversations. Checkout the conversations between ChatGPT and me if you are interested in.