-
Что такое
полиморфизм
? -
Что такое *инкапсуляция? Что такое *нарушение инкапсуляции?
-
Чем
абстрактный
класс отличается отинтерфейса
? -
Расскажите о
паттерне MVC
. Чем отличаетсяпассивная
модель отактивной
?
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
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
A common task when developing iOS apps is to register custom cell subclasses for both UITableView
and UICollectionView
. Well, that is if you don’t use Storyboards, of course.
Both UITableView
and UICollectionView
offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
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
extension UIView { | |
func shake(duration: CFTimeInterval) { | |
let translation = CAKeyframeAnimation(keyPath: "transform.translation.x"); | |
translation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) | |
translation.values = [-5, 5, -5, 5, -3, 3, -2, 2, 0] | |
let rotation = CAKeyframeAnimation(keyPath: "transform.rotation.z") | |
rotation.values = [-5, 5, -5, 5, -3, 3, -2, 2, 0].map { | |
(let degrees: Double) -> Double in | |
let radians: Double = (M_PI * degrees) / 180.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
// Navigate to your "My List" page before running this in your web console | |
// Get a list of all titles | |
var movies = document.querySelectorAll(".slider-item"); | |
// pick a random number between 0 and length | |
var random = Math.floor(Math.random() * movies.length); | |
// this is our movie | |
var movie = movies[random]; |
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 | |
// Conform the `Polygon` protocol to specify the vertices of the polygon. | |
protocol Polygon { | |
var vertices: [CGPoint] { get } | |
} | |
// UIView conforms the protocol `Polygon` to specified the vertices of the rectangle. | |
extension UIView: Polygon { |
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
// | |
// Combine+WithLatestFrom.swift | |
// | |
// Created by Shai Mishali on 29/08/2019. | |
// Copyright © 2019 Shai Mishali. All rights reserved. | |
// | |
import Combine | |
// MARK: - Operator methods |