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
let firstRequestGroup = DispatchGroup() | |
let secondRequestGroup = DispatchGroup() | |
for () { | |
requestGroup.enter() | |
firstRequest() { | |
print("DEBUG: FIRST Request") | |
if success { | |
requestGroup.enter() | |
secondRequest() { |
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 | |
/// A validation rule for text input. | |
public enum TextValidationRule { | |
/// Any input is valid, including an empty string. | |
case noRestriction | |
/// The input must not be empty. | |
case nonEmpty | |
/// The enitre input must match a regular expression. A matching substring is not enough. | |
case regularExpression(NSRegularExpression) |
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
disabled_rules: # rule identifiers to exclude from running | |
# Number of function parameters should be low. | |
- function_parameter_count | |
# Type bodies should not span too many lines. | |
- type_body_length | |
# Complexity of function bodies should be limited. | |
- cyclomatic_complexity |
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
// | |
// PlistDecoder.swift | |
// Bilal Arslan | |
// | |
// Created by BILAL ARSLAN on 14.12.2018. | |
// Copyright © 2018 BILAL ARSLAN. All rights reserved. | |
// | |
import Foundation |
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
// | |
// JuxNetworkActivityIndicator.swift | |
// Bilal Arslan | |
// | |
// Created by BILAL ARSLAN on 14.12.2018. | |
// Copyright © 2018 BILAL ARSLAN. 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
import ContactsUI | |
class ExampleViewController: UIViewController { | |
private func dispayContacts() { | |
let contactPicker = CNContactPickerViewController() | |
contactPicker.delegate = self | |
contactPicker.displayedPropertyKeys = [CNContactGivenNameKey, CNContactPhoneNumbersKey] | |
contactPicker.predicateForEnablingContact = NSPredicate(format: "phoneNumber.@count > 0") | |
contactPicker.predicateForSelectionOfContact = NSPredicate(value: false) |
OlderNewer