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
// | |
// UIDeviceExtension.swift | |
// | |
// Created by shankars on 3/15/19. | |
// Copyright © 2019 shankars. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
//: Playground - noun: a place where people can play | |
import Foundation | |
struct Swifter { | |
let fullName: String | |
let id: Int | |
let twitter: URL | |
init(fullName: String, id: Int, twitter: URL) { // default struct initializer |
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
// | |
// ViewController.swift | |
// ContactApp | |
// | |
// Created by Yugan on 08/05/18. | |
// Copyright © 2018 Yugan. All rights reserved. | |
// | |
import UIKit |
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
print("Q:1:") | |
let val = 10.2 | |
print("\(val) of type \(val.description)") | |
var numbers = [1,2,3] | |
numbers+=[4] | |
print(numbers) |
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 UIKit | |
let twoDiamentionalArray = [ | |
["Shankar","Archana","Amol","Shivaji","Ketan"], | |
["Mumbai","Pune","Dehli","Hyderabad"], | |
["Elephant","Cat","Dog","Cow","Tiger","Lion"] | |
] | |
let sectionNames = ["Best Friends","Beautiful Cities","Faviorate Animal"] |
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
let cellIdentifier = "CellIdentifier" | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellIdentifier) | |
} | |
OR |
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 UIKit | |
@IBDesignable | |
class CustomImageView: UIImageView { | |
@IBInspectable var borderColor: UIColor? = UIColor.clear { | |
didSet { | |
layer.borderColor = self.borderColor?.cgColor | |
} | |
} | |