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
| // | |
| // UserDefaultsManager.swift | |
| // Www.ADKATech.com | |
| // | |
| // Created by AmrAngry on 7/30/19. | |
| // Modifyed by AmrAngry on 5/5/20. | |
| // Copyright © 2019 Www.ADKATech.com. All rights reserved. | |
| // Generic use original mestion by (FB)محمود زكى and hamada147(Github) | |
| import Foundation |
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
| // assign table view controller custom class to: | |
| // DonMagSampleTableViewController | |
| // no cell Prototypesneeded | |
| // no @IBOutlet or @IBAction connections needed | |
| struct DonMagSampleDataStruct { | |
| var color: UIColor = .white | |
| var strings: [String] = [] | |
| } |
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 | |
| protocol DropDownButtonDelegate: AnyObject { | |
| func didSelect(_ index: Int) | |
| } | |
| class DropDownButton: UIView { | |
| let button: UIButton = { | |
| let button = UIButton() |
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
| DispatchQueue.main.asyncAfter(deadline: .now() + 0.500) { | |
| self.tableView.setNeedsLayout() | |
| self.tableView.layoutIfNeeded() | |
| self.tableView.reloadData() | |
| DispatchQueue.main.asyncAfter(deadline: .now() + 0.500) { | |
| UIView.performWithoutAnimation { | |
| let firstIndexPath = IndexPath(row: 0, section: 0) | |
| self.tableView.reloadRows(at: [firstIndexPath], with: .none) | |
| self.tableView.setContentOffset(CGPoint.zero, animated: true) | |
| } |
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 | |
| // ConstantArea | |
| // | |
| // Created by Gleb Tarasov on 24.05.2020. | |
| // Copyright © 2020 Gleb Tarasov. 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
| This is a collection view of vertically scrolling cells 1/3 high as wide and left hand image 1/3 width of screen with text label 2/3 screen width to the right of the image. This is completely created in code. I created a View Controller on the storyboard as I needed to attach a navgation controller. All you ever ever need to adjust is the imageAspectRatio and te image will always be 1/3 of the width of the cell row. | |
| ViewController code. | |
| import UIKit | |
| let imageAspectRatio : CGFloat = 1.2 |
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
| 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 |
NewerOlder