-
Что такое
полиморфизм
? -
Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?
-
Чем
абстрактный
класс отличается отинтерфейса
? -
Расскажите о
паттерне MVC
. Чем отличаетсяпассивная
модель отактивной
?
# coding: utf-8 | |
from objc_util import * | |
import console | |
import urllib | |
import dialogs | |
WKWebView = ObjCClass('WKWebView') | |
UIViewController = ObjCClass('UIViewController') | |
UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
NSURLRequest = ObjCClass('NSURLRequest') |
# IMPORTANT SETUP INSTRUCTIONS: | |
# | |
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary) | |
# 2. Select "Create App" | |
# 3. Select the following settings: | |
# * "Dropbox API app" | |
# * "Files and datastores" | |
# * "(No) My app needs access to files already on Dropbox" | |
# * "All file types" | |
# * (Choose any app name) |
Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.
If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.
If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).
protocol Thing { | |
typealias argType | |
func doit(val:argType) -> argType | |
} | |
class IntThing : Thing { | |
func doit(val: Int) -> Int { | |
return val + 1 | |
} | |
} |
#!/usr/bin/python | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |
import Foundation | |
public let Defaults = UserDefaults.standard | |
open class DefaultsKeys { | |
fileprivate init() {} | |
} | |
open class DefaultsKey<ValueType>: DefaultsKeys { | |
public let _key: String |
extension JSONDecoder.DateDecodingStrategy { | |
static var iso8601Custom: JSONDecoder.DateDecodingStrategy { | |
return .custom { decoder in | |
let container = try decoder.singleValueContainer() | |
let string = try container.decode(String.self) | |
guard let date = DateFormatter.iso8601Mapping.date(from: string) else { | |
throw DecodingError.dataCorruptedError(in: container, | |
debugDescription: "Date is in invalid format") | |
} | |
return date |
I hereby claim:
- I am austinate on github.
- I am austinate (https://keybase.io/austinate) on keybase.
- I have a public key ASAPmBx5jZz-oc3Tphwr6CxP3Sq8tUN1jSJryD90QuDEYAo
To claim this, I am signing this object:
import UIKit | |
typealias ConstraintBuilder = (_ child: UIView, _ parent: UIView) -> NSLayoutConstraint | |
extension UIView { | |
func addSubview(_ child: UIView, constraints: [ConstraintBuilder]) { | |
addSubview(child) | |
child.translatesAutoresizingMaskIntoConstraints = false | |
NSLayoutConstraint.activate(constraints.map { $0(child, self) }) | |
} |