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
// | |
// ViewController.swift | |
// SwiftJSONParsingDemo | |
// | |
// Created by Ashish Kakkad on 12/10/16. | |
// Copyright © 2016 Kode. All rights reserved. | |
// | |
import UIKit |
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
#include<stdio.h> | |
int main() { | |
int i, j, spaces = 0, sc, n = 0; | |
int k = 1; | |
printf("Enter Number of Lines = "); | |
scanf("%d",&n); | |
spaces = n - 1; | |
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
// | |
// AFWrapper.swift | |
// AFSwiftDemo | |
// | |
// Created by Ashish on 10/4/16. | |
// Copyright © 2016 Ashish Kakkad. All rights reserved. | |
// | |
import UIKit | |
import Alamofire |
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 { | |
var colorWell: UIColorWell! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
addColorWell() | |
} |
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() |
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
// | |
// 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
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) |
OlderNewer