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
// Интерфейсное объявление класса | |
- (NSURL *)applicationDocumentsDirectory; | |
// конец интерфейса | |
//======================================= | |
// Раздел реализации класса |
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
// | |
// SignRequest.h | |
// CryptClassPro | |
// | |
// Created by VITALIY PODOLSKIY on 01/08/15. | |
// Copyright © 2015 VITALIY PODOLSKIY. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
// | |
// AppsViewController.h | |
// Clean for VK | |
// | |
// Created by VITALIY PODOLSKIY on 01/10/15. | |
// Copyright © 2015 VITALIY PODOLSKIY. All rights reserved. | |
// | |
#import "BaseViewController.h" |
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
// В пргументах схемы добавить ключ: | |
-com.apple.CoreData.SQLDebug 1 |
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
// Создаем пустой swift файл и вставляем в него код | |
import UIKit | |
@IBDesignable class GraphView: UIView { | |
//1 - the properties for the gradient | |
@IBInspectable var startColor: UIColor = UIColor.redColor() | |
@IBInspectable var endColor: UIColor = UIColor.greenColor() | |
override func drawRect(rect: 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
class TableViewRowAction: UITableViewRowAction { | |
var image: UIImage? | |
func _setButton(button: UIButton) { | |
if let image = image, let titleLabel = button.titleLabel { | |
let labelString = NSString(string: titleLabel.text!) | |
let titleSize = labelString.sizeWithAttributes([NSFontAttributeName: titleLabel.font]) | |
button.tintColor = UIColor.whiteColor() | |
button.setImage(image.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal) | |
button.imageEdgeInsets.right = -titleSize.width |
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 SystemConfiguration | |
class Reachability { | |
class func isConnectedToNetwork() -> Bool { | |
var zeroAddress = sockaddr_in() | |
zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress)) | |
zeroAddress.sin_family = sa_family_t(AF_INET) | |
guard let defaultRouteReachability = withUnsafePointer(&zeroAddress, { | |
SCNetworkReachabilityCreateWithAddress(nil, UnsafePointer($0)) |
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
func makeUrl(url: String) -> String { | |
var contents: String = "" | |
if let urlApi = NSURL(string: "https://clck.ru/--?url=\(url)") { | |
do { | |
contents = try String(contentsOfURL: urlApi, usedEncoding: nil) | |
print(contents) | |
} catch { | |
} | |
} else { |
NewerOlder