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 | |
public struct AnchoredConstraints { | |
var top, leading, bottom, trailing, width, height: NSLayoutConstraint? | |
} | |
extension UIView { | |
@available(iOS 9.0, *) | |
@discardableResult |
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 | |
extension UITapGestureRecognizer { | |
func didTapAttributedTextInLabel(label: UILabel, inRange targetRange: NSRange) -> Bool { | |
// Create instances of NSLayoutManager, NSTextContainer and NSTextStorage | |
let layoutManager = NSLayoutManager() | |
let textContainer = NSTextContainer(size: CGSize.zero) | |
let textStorage = NSTextStorage(attributedString: label.attributedText!) | |
// Configure layoutManager and textStorage |
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 TWReusableCollectionViewCell: UICollectionViewCell { | |
var slot: UIView! { | |
didSet { | |
layoutViews() | |
} | |
} | |
override init(frame: CGRect) { |
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
// | |
// MoyaServices.swift | |
// Sensgreen-ios | |
// | |
// Created by KUTAN ÇINGISIZ on 9.11.2018. | |
// Copyright © 2018 KUTAN ÇINGISIZ. All rights reserved. | |
// | |
import Foundation | |
import Moya |
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
// | |
// TextFieldViewWithDivider.swift | |
// sensme-ios | |
// | |
// Created by KUTAN ÇINGISIZ on 8.04.2019. | |
// Copyright © 2019 KUTAN ÇINGISIZ. 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
struct CustomToggleView : View { | |
@State var isToggled = false | |
var toggleBody = Circle() | |
.frame(width: 30, height: 30) | |
.foregroundColor(.white) | |
var body: some View { | |
HStack { | |
if isToggled { |
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
// | |
// ContentView.swift | |
// Pop | |
// | |
// Created by KUTAN ÇINGISIZ on 6.06.2019. | |
// Copyright © 2019 KUTAN ÇINGISIZ. All rights reserved. | |
// | |
import SwiftUI |
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
// | |
// RowView.swift | |
// Pop | |
// | |
// Created by KUTAN ÇINGISIZ on 7.06.2019. | |
// Copyright © 2019 KUTAN ÇINGISIZ. All rights reserved. | |
// | |
import SwiftUI |