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 UIImageView{ | |
func frameForImageInImageViewAspectFit() -> CGRect | |
{ | |
if let img = self.image { | |
let imageRatio = img.size.width / img.size.height; | |
let viewRatio = self.frame.size.width / self.frame.size.height; | |
if(imageRatio < viewRatio) | |
{ |
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 open(scheme: String) { | |
if let url = URL(string: scheme) { | |
if #available(iOS 10, *) { | |
UIApplication.shared.open(url, options: [:], | |
completionHandler: { | |
(success) in | |
print("Open \(scheme): \(success)") | |
}) | |
} else { | |
let success = UIApplication.shared.openURL(url) |
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 writeLabel(firstTextfield: String) -> Int { | |
guard let d : Int = Int(firstTextfield) else { | |
let d : Int = 0 | |
print("Değer Yok") | |
return d | |
} | |
print(d) | |
return d |
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
{ | |
"messages": [], | |
"routes": { | |
"hasM": true, | |
"fieldAliases": { | |
"ObjectID": "ObjectID", | |
"Name": "Name", | |
"FirstStopID": "FirstStopID", | |
"LastStopID": "LastStopID", | |
"StopCount": "StopCount", |
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 | |
// Keychain_Example | |
// | |
// Created by Furkan Ozoglu on 13.11.2017. | |
// Copyright © 2017 Furkan Ozoglu. All rights reserved. | |
// | |
import UIKit | |
import Locksmith |
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 Alamofire | |
import SwiftyJSON | |
import Foundation | |
let API_BASE_URL = "http://api.fozoglu.com" | |
class APICallManager { | |
static let instance = APICallManager() | |
enum RequestMethod { |
OlderNewer