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 RootStackTabViewController: UIViewController { | |
@IBOutlet weak var bottomStack: UIStackView! | |
var currentIndex = 0 | |
lazy var tabs: [StackItemView] = { |
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 | |
import FLUtilities | |
protocol StackItemViewDelegate: class { | |
func handleTap(_ view: StackItemView) | |
} | |
class StackItemView: UIView { | |
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 BottomStackItem { | |
var title: String | |
var image: String | |
var isSelected: Bool | |
init(title: String, | |
image: String, | |
isSelected: Bool = false) { |
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
public func delay(_ delay: Double, closure: @escaping () -> Void) { | |
let deadline = DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC) | |
DispatchQueue.main.asyncAfter( | |
deadline: deadline, | |
execute: closure | |
) | |
} |
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
// | |
// HorizontalPaginationManager.swift | |
// HorizontalPaginationDemo | |
// | |
// Created by Abhishek Thapliyal on 15/07/20. | |
// Copyright © 2020 Abhishek Thapliyal. All rights reserved. | |
// | |
import Foundation | |
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
extension ViewController: UITextViewDelegate { | |
private func setupTextView() { | |
self.commentTextView.delegate = self | |
} | |
func textViewDidEndEditing(_ textView: UITextView) { | |
self.placeHolderLabel.isHidden = !textView.text.isEmpty | |
} |
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
extension ViewController { | |
private func setupKeyboardNotifications() { | |
NotificationCenter.default.addObserver(self, | |
selector: #selector(keyboardWillShow(_:)), | |
name: UIResponder.keyboardWillShowNotification, | |
object: nil) | |
NotificationCenter.default.addObserver(self, |
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 | |
// ExpandableTextViewDemo | |
// | |
// Created by Abhishek Thapliyal on 20/07/20. | |
// Copyright © 2020 Abhishek Thapliyal. 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 DropDownCellModel { | |
var item: PerformanceDateGroup | |
var isSelected: Bool | |
init(item: PerformanceDateGroup, isSelected: Bool = false) { | |
self.item = item | |
self.isSelected = isSelected | |
} | |
} |
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
extension MyViewController: DropDownViewDelegate { | |
private func setupData() { | |
guard let model = self.dropDownView.cellItems.first else { return } | |
self.handleDates(model: model) | |
} | |
private func hideOnOtherView() { | |
if self.dropDownView.isVisible { |
NewerOlder