- Обсуждение архитектурных решений, накопившихся за неделю.
- Тимлид за неделю выписывает моменты в Pull Request'ах, на которые стоит обратить внимание
- Вопрос/ответ
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
if let url = Bundle.main.url(forResource: "Room", withExtension: "json"), | |
let jsonData = try? Data(contentsOf: url) { | |
readAndTransform(jsonData: jsonData) | |
} | |
} | |
struct RoomPlan: Codable { |
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
public List<String> getCommonColors(String blueprintId, List<String> printProviders) throws IOException { | |
List<String> commonColors = new ArrayList<String>(); | |
Map<String, Boolean> colorsMap = new HashMap<>(); | |
for (String printProvider : printProviders) { | |
VariantsResponse variantsResponse = getVariants(blueprintId, printProvider); | |
List<Variant> variants = variantsResponse.getVariants(); | |
for (Variant variant : variants) { | |
Options options = variant.getOptions(); | |
String color = options.getColor(); |
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
public List<String> getCommonColors(String blueprintId, List<String> printProviders) throws IOException { | |
List<String> commonColors = new ArrayList<String>(); | |
for (String printProvider : printProviders) { | |
VariantsResponse variantsResponse = getVariants(blueprintId, printProvider); | |
List<Variant> variants = variantsResponse.getVariants(); | |
for (Variant variant : variants) { | |
Options options = variant.getOptions(); | |
String color = options.getColor(); | |
if (!commonColors.contains(color)) { |
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 модели делятся на ReferenceType и на ValueType. | |
// Set, Dictionary, Array - Типы коллекций в Swift, они имеют Value Type. | |
// Integer, String, Bool, Double, etc. - Примитивные типы в Swift, они имеют Value Type. | |
// Closures, UIView, UIViewController, классы - это Reference Type. |
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
typealias VoidClosure = () -> Void // Пустое замыкание | |
typealias ItemClosure<T> = (T) -> Void // Замыкание с аргументом любого типа |
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
# Broniboy iOS Teamlead Plan | |
## Митинги и созвоны | |
### Митинг iOS Команды - Среда с 17-00 до 18-00 | |
- Обсуждение архитектурных решений, накопившихся за неделю. | |
- Тимлид за неделю выписывает моменты в Pull Request'ах, на которые стоит | |
обратить внимание | |
- Вопрос/ответ |
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
{ | |
"title": "Меню", | |
"sections": [ | |
{ | |
"title": "", | |
"blocks": [ | |
{ | |
"text": "О сервисе", | |
"backgroundImage": "https://..." | |
}, |
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 | |
import CoreLocation | |
class LocationProvider: NSObject, CLLocationManagerDelegate { | |
static let shared = LocationProvider() | |
var city: String? | |
var currentLocation: CLLocation? | |
var lastRealOneLocation: CLLocation? | |
private var locationList: [CLLocation] = [] |
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 CoreLocation | |
struct LocationUtils { | |
let isGps: Bool | |
let accuracy: Double | |
let speed: Double | |
let latitude: Double | |
let longitude: Double | |
let previousValidLatitude: Double | |
let previousValidLongitude: Double |
NewerOlder