This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public struct SkeletonGradientAnimationView: View { | |
| @State var offset: CGFloat = 0 | |
| public var body: some View { | |
| ZStack { | |
| GeometryReader { reader in | |
| let largestSide = reader.size.width > reader.size.height ? reader.size.width : reader.size.height | |
| LinearGradient( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ExampleTabbedView : View { | |
| @State private var selection = 1 | |
| var body: some View { | |
| TabbedView(selection: $selection) { | |
| Text("Tab 1") | |
| .tabItem({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PR is a work in progress and shouldn't be merged yet | |
| warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]" | |
| # Warn when there is a big PR | |
| warn "Big PR, consider splitting into smaller" if git.lines_of_code > 500 | |
| # Ensure a clean commits history | |
| if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ } | |
| fail "Please rebase to get rid of the merge commits in this PR" | |
| end |
Author: Chris Lattner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define RADIANOS_PARA_GRAUS(radians) ((radians) * (180.0 / M_PI)) | |
| -(float)anguloEntreCoordenadas:(CLLocationCoordinate2D)primeiraCoordenada | |
| toCoordinate:(CLLocationCoordinate2D)segundaCoordenada { | |
| float deltaLongitude = segundaCoordenada.longitude - primeiraCoordenada.longitude; | |
| float deltaLatitude = segundaCoordenada.latitude - primeiraCoordenada.latitude; | |
| // lembrando que M_PI * .5f = pi / 2 | |
| float angulo = (M_PI * .5f) - atan(deltaLatitude / deltaLongitude); |

