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 SceneKit | |
import PlaygroundSupport | |
var sceneView = SCNView() | |
PlaygroundPage.current.liveView = sceneView | |
sceneView.backgroundColor = .black | |
var scene = SCNScene() | |
sceneView.scene = scene | |
var universe = scene.rootNode |
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 Cocoa | |
import Foundation | |
@discardableResult | |
func acquirePrivileges() -> Bool { | |
let accessEnabled = AXIsProcessTrustedWithOptions([kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true] as CFDictionary) | |
if accessEnabled != true { | |
print("You need to enable the keylogger in the System Prefrences") |
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
// UITextField | |
let textField = UITextField() | |
textField.addAction( | |
UIAction { action in | |
let textField = action.sender as! UITextField | |
print(textField.text ?? "") | |
}, | |
for: .editingChanged | |
) |
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
// | |
// Model.swift | |
// KidSpace | |
// | |
// Created by October Hammer on 4/19/17. | |
// Copyright © 2017 Ocotober Hammer. All rights reserved. | |
// | |
import Foundation | |
import Parse |
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
//Put this function into the extension of the UICollectionVIewDelegate and you will get the index of the current cell displaying. | |
// This will be helpful when you will implemenet the image slider with the help of the collectionView(by default pagination of the collectionView). | |
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { | |
print("Currently visible cell is \(self.collectionView.indexPathsForVisibleItems)") | |
} |
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
class ViewController: UIViewController,URLSessionDownloadDelegate { | |
@IBOutlet weak var scnView: SCNView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. | |
downloadSceneTask() | |
} | |
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 ContentView: View { | |
// sample of data was compiled using the following sources: | |
// https://birdgei.com/2011/08/30/list-of-100-irregular-plural-nouns-in-english/ | |
// https://www.grammarly.com/blog/plural-nouns/ | |
// https://www.thoughtco.com/irregular-plural-nouns-in-english-1692634 | |
// https://www.ef.co.uk/english-resources/english-grammar/singular-and-plural-nouns/ | |
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
struct ToggledExampleView_Previews: PreviewProvider { | |
static var previews: some View { | |
DebuggingToggledExampleView() | |
} | |
} | |
// MARK: - Toggled Source | |
protocol ToggleInterface { | |
associatedtype ValueType |
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
// | |
// ContentView.swift | |
// Shared | |
// | |
// Created by Dan Tavares on 01/07/2022. | |
// More Info: https://nilcoalescing.com/blog/EncodeAndDecodeSwiftUIColor/ | |
import SwiftUI | |
#if os(iOS) |
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
// | |
// FileUtility.swift | |
// TravelApp | |
// | |
// Created by Anand Nimje on 13/04/20. | |
// Copyright © 2020 Anand. All rights reserved. | |
// | |
import Foundation |
NewerOlder