This file contains 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
1. Hva dagens unge lærer fra eldre? Bør de unge lære av eldre? | |
2. Hva synes du om å følge med på nyhetene gjennom døgnet? Bør nyheter være tilgjengelig 24/7? | |
3. Hva synes du om å spise sunn mat? | |
4. Gjør sosiale medier oss mindre sosial? | |
5. Bør barna bruke mobiltelefonen i skolen? | |
6. Nordmenn tar ikke kontakt med innvandrere? | |
7. Synes du unge mennesker har **for** høye forventninger til livet og seg selv? | |
8. Hva synes du er en dårlig og god skole? | |
9. Hva må være gratis i Norge? (Kollektivtransport, utdanning?) | |
10. Er bolig og gode boligforhold viktig **for** å ha et godt liv? |
This file contains 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 Foundation | |
extension String { | |
/// Returns a percent-escaped string following RFC 3986 for a query string key or value. | |
/// | |
/// RFC 3986 states that the following characters are "reserved" characters. | |
/// | |
/// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" | |
/// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" | |
/// |
This file contains 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
// Used to detect specific issue with JSON decoding | |
func decodeOrReport(data: Data) { | |
do { | |
let _ = try JSONDecoder().decode(WidgetResponse.self, from: data) | |
print("\n\n👍ALL GOOD\n\n") | |
} catch DecodingError.keyNotFound( let key, let context) { | |
print("\n\n⛔️FAILED TO DECODE\n\n") | |
print("could not find key \(key) in JSON: \(context.debugDescription)") | |
} catch DecodingError.valueNotFound( let type, let context) { | |
print("\n\n⛔️FAILED TO DECODE\n\n") |
This file contains 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
struct AnimationWithReduceMotion<V: Equatable>: ViewModifier { | |
@Environment(\.accessibilityReduceMotion) | |
private var reduceMotion | |
var animation: Animation? | |
let value: V | |
func body(content: Content) -> some View { | |
content |
This file contains 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
struct MaterialView: View { | |
var foregroundColor: Color = Color.purple | |
let text: String | |
var body: some View { | |
Text(text) | |
.padding() | |
.background(.quaternary) | |
.foregroundStyle(foregroundColor) |
This file contains 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 | |
import CoreMotion | |
struct CMMotionManagerTest: View { | |
@StateObject var motion = MotionManager() | |
var body: some View { | |
ZStack { | |
Color.purple |
This file contains 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
@main | |
struct mainApp: App { | |
init() { | |
// custom init if needed. Analytics setup and similar | |
} | |
var body: some Scene { | |
WindowGroup { | |
MainView(mainObservableObject: MainObservableObject()) |
This file contains 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 ContentView: View { | |
let rows = Array(repeating: GridItem(), count: 10) | |
@State var change: Bool = false { | |
didSet { | |
toggle() | |
} |
This file contains 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 Ring: View { | |
var body: some View { | |
HStack { | |
Spacer() | |
ZStack(alignment: .trailing) { | |
Circle() | |
.strokeBorder(Color.circleGradientColor, lineWidth: 50) | |
Circle() |
This file contains 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
extension Color { | |
// MARK: Gradients | |
static var backgroundGradient = LinearGradient(colors: [Color(hex: "#50A7F7"), Color(hex: "#2566F6")], startPoint: .top, endPoint: .bottom) | |
static var topWaterColor = Color(hex: "#739BF7") | |
static var midWaterColor = Color(hex: "#5989F5") | |
static var backWaterColor = Color(hex: "#4979E7") | |
static var buttonGradient = LinearGradient(colors: [Color(hex: "#F4F8FA"), Color(hex: "#B6CCF7")], startPoint: .top, endPoint: .bottom) | |
} |
NewerOlder