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
| // | |
| // BottomSheetView.swift | |
| // | |
| // Created by Majid Jabrayilov | |
| // Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
| // | |
| import SwiftUI | |
| fileprivate enum Constants { | |
| static let radius: CGFloat = 16 |
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 GradientCircle: UIView, CAAnimationDelegate { | |
| let gradientLayer: CAGradientLayer = CAGradientLayer() | |
| var startAngle: CGFloat = (-(.pi) / 2) | |
| var endAngle: CGFloat = 3 * ((.pi) / 2) | |
| override func draw(_ rect: CGRect) { | |
| let center = CGPoint(x: rect.midX, y: rect.midY) |
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
| func getQueryItems(_ urlString: String) -> [String : String] { | |
| var queryItems: [String : String] = [:] | |
| let components: NSURLComponents? = getURLComonents(urlString) | |
| for item in components?.queryItems ?? [] { | |
| queryItems[item.name] = item.value?.removingPercentEncoding | |
| } | |
| return queryItems | |
| } | |
| func getURLComonents(_ urlString: String?) -> NSURLComponents? { |
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
| func getQueryItems(_ urlString: String) -> [String : String] { | |
| var queryItems: [String : String] = [:] | |
| let components: NSURLComponents? = getURLComonents(urlString) | |
| for item in components?.queryItems ?? [] { | |
| queryItems[item.name] = item.value?.removingPercentEncoding | |
| } | |
| return queryItems | |
| } | |
| func getURLComonents(_ urlString: String?) -> NSURLComponents? { |
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 | |
| class ViewController: UIViewController { | |
| let letters = ["안녕","안녕하세요","안녕하세요 저는 포마입니다.","안녕하세요 만나서 정말 반갑습니다."] | |
| @IBOutlet weak var collection: UICollectionView! | |
| override func viewDidLoad() { | |
| configure() |
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
| // | |
| // TestimonyCollectionViewController.swift | |
| // EMtrade | |
| // | |
| // Created by Fachruzi Ramadhan on 02/09/20. | |
| // Copyright © 2020 Fachruzi Ramadhan. 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
| // | |
| // TestimonyCollectionViewController.swift | |
| // EMtrade | |
| // | |
| // Created by Fachruzi Ramadhan on 02/09/20. | |
| // Copyright © 2020 Fachruzi Ramadhan. 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
| // | |
| // ViewController.swift | |
| // Delete | |
| // | |
| // Created by Mike Chirico on 10/21/15. | |
| // Copyright © 2015 Mike Chirico. 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
| class ViewController: UIViewController { | |
| @IBOutlet weak var cornerView: UIView! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| cornerView.clipsToBounds = true | |
| cornerView.layer.cornerRadius = 50 | |
| cornerView.layer.maskedCorners = CACornerMask(arrayLiteral: .layerMinXMinYCorner, .layerMaxXMinYCorner) |
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 LocationDataSource: NSObject, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout | |
| { | |
| let locations: [LocationModel]; | |
| let setSelectedLocation: SetLocationDelegate; | |
| init(locations: [LocationModel], delegate: @escaping SetLocationDelegate) | |
| { | |
| self.locations = locations; | |
| self.setSelectedLocation = delegate; | |
| } |