π¨βπ»
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
// | |
// SecondView.swift | |
// PassDataSwiftUI | |
// | |
// Created by Kode on 24/08/22. | |
// | |
import SwiftUI | |
struct SecondView: View { |
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
// | |
// ContactListView.swift | |
// APISwiftUI | |
// | |
// Created by Kode on 21/08/22. | |
// | |
import SwiftUI | |
struct ContactListView: View { |
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
// | |
// Models.swift | |
// APISwiftUI | |
// | |
// Created by Kode on 04/08/22. | |
// | |
import Foundation | |
// MARK: - ContactResult | |
struct ContactResult: Codable { |
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
// | |
// APIHelper.swift | |
// APISwiftUI | |
// | |
// Created by Kode on 04/08/22. | |
// | |
import Foundation | |
class APIHelper : ObservableObject { |
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 UIView { | |
func preventScreenshot() { | |
DispatchQueue.main.async { | |
let field = UITextField() | |
field.isSecureTextEntry = true | |
self.addSubview(field) | |
field.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true | |
field.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true | |
self.layer.superlayer?.addSublayer(field.layer) | |
field.layer.sublayers?.first?.addSublayer(self.layer) |
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
// | |
// AKParticleView.swift | |
// AKSwiftUIParticles | |
// | |
// Created by Ashish Kakkad on 30/04/22. | |
// | |
import SwiftUI | |
import SpriteKit |
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
private enum Field: Int, CaseIterable { | |
case username, password | |
} | |
@State private var username: String = "" | |
@State private var password: String = "" | |
@FocusState private var focusedField: Field? | |
var body: some View { |
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 UIKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} | |
@IBAction func btnColorPickerPressed(_ sender: Any) { | |
let colorPickerVC = UIColorPickerViewController() |