diff --git a/lesson-01/loginForm/Base.lproj/Main.storyboard b/lesson-01/loginForm/Base.lproj/Main.storyboard
deleted file mode 100644
index 0c6dc4d..0000000
--- a/lesson-01/loginForm/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lesson-01/loginForm/ViewController.swift b/lesson-01/loginForm/ViewController.swift
deleted file mode 100644
index 2a52403..0000000
--- a/lesson-01/loginForm/ViewController.swift
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// ViewController.swift
-// loginForm
-//
-// Created by prot on 30/01/2020.
-// Copyright © 2020 prot. All rights reserved.
-//
-
-import UIKit
-
-class ViewController: UIViewController {
-
- @IBOutlet weak var scrollView: UIScrollView!
- @IBOutlet weak var textFieldLogin: UITextField!
- @IBOutlet weak var textFieldPass: UITextField!
- @IBOutlet weak var labelLogin: UILabel!
-
-
-
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view.
- let tapGesture = UITapGestureRecognizer(target: self, action: #selector(hideKeyboard)) //переменная для закрытия клавитуры при тапе
- scrollView.addGestureRecognizer(tapGesture) // закрытие клавитуры
- }
-
- @IBAction func buttonInTap(_ sender: Any) {
- let login = textFieldLogin.text
- let pass = textFieldPass.text
-
- if login == "admin" && pass == "admin" {
- labelLogin.text = "Успешная авторизация"
- }else {
- labelLogin.text = "Неверный логин или пароль"
- }
- }
-
-
-
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
-
- // Подписываемся на два уведомления: одно приходит при появлении клавиатуры
-
- NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShown(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
- // Второе — когда она пропадает
- NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil)
- }
- // Когда клавиатура появляется
- @objc func keyboardWillShown ( notification : Notification) {
- // Получаем размер клавиатуры
- let info = notification.userInfo! as NSDictionary
- let size = (info.value(forKey: UIResponder.keyboardFrameEndUserInfoKey) as! NSValue).cgRectValue.size
- let contentInsents = UIEdgeInsets(top: 0, left: 0, bottom: size.height, right: 0)
- // Добавляем отступ внизу UIScrollView, равный размеру клавиатуры
- self.scrollView?.contentInset = contentInsents
- self.scrollView.scrollIndicatorInsets = contentInsents
-
- }
- //Когда клавиатура исчезает
- @objc func keyboardWillHide ( notification : Notification) {
- // Устанавливаем отступ внизу UIScrollView, равный 0
- scrollView.contentInset = .zero
-
- }
- //клик по пустому месту на экране сворачивает клаву
- @objc func hideKeyboard() {
- self.scrollView.endEditing(true)
- }
-
-
-
-
-
-
-
-
-
-
-
- }
-
-
diff --git a/lesson-02/.keep b/lesson-02/.keep
deleted file mode 100644
index e69de29..0000000
diff --git a/lesson-02/loginForm.xcodeproj/project.pbxproj b/lesson-02/loginForm.xcodeproj/project.pbxproj
deleted file mode 100644
index d0fdc5c..0000000
--- a/lesson-02/loginForm.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,349 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 50;
- objects = {
-
-/* Begin PBXBuildFile section */
- 9C761E7423E1EBE00090FB56 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7323E1EBE00090FB56 /* AppDelegate.swift */; };
- 9C761E7623E1EBE00090FB56 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */; };
- 9C761E7823E1EBE00090FB56 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7723E1EBE00090FB56 /* ViewController.swift */; };
- 9C761E7B23E1EBE00090FB56 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7923E1EBE00090FB56 /* Main.storyboard */; };
- 9C761E7D23E1EBE10090FB56 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7C23E1EBE10090FB56 /* Assets.xcassets */; };
- 9C761E8023E1EBE10090FB56 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7E23E1EBE10090FB56 /* LaunchScreen.storyboard */; };
- 9CB6A6AF23E42F6D00891466 /* MyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB6A6AE23E42F6D00891466 /* MyViewController.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 9C761E7023E1EBE00090FB56 /* loginForm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = loginForm.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 9C761E7323E1EBE00090FB56 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
- 9C761E7723E1EBE00090FB56 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
- 9C761E7A23E1EBE00090FB56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
- 9C761E7C23E1EBE10090FB56 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 9C761E7F23E1EBE10090FB56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 9C761E8123E1EBE10090FB56 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 9CB6A6AE23E42F6D00891466 /* MyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyViewController.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 9C761E6D23E1EBE00090FB56 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 9C761E6723E1EBE00090FB56 = {
- isa = PBXGroup;
- children = (
- 9C761E7223E1EBE00090FB56 /* loginForm */,
- 9C761E7123E1EBE00090FB56 /* Products */,
- );
- sourceTree = "";
- };
- 9C761E7123E1EBE00090FB56 /* Products */ = {
- isa = PBXGroup;
- children = (
- 9C761E7023E1EBE00090FB56 /* loginForm.app */,
- );
- name = Products;
- sourceTree = "";
- };
- 9C761E7223E1EBE00090FB56 /* loginForm */ = {
- isa = PBXGroup;
- children = (
- 9C761E7323E1EBE00090FB56 /* AppDelegate.swift */,
- 9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */,
- 9C761E7723E1EBE00090FB56 /* ViewController.swift */,
- 9C761E7923E1EBE00090FB56 /* Main.storyboard */,
- 9CB6A6AE23E42F6D00891466 /* MyViewController.swift */,
- 9C761E7C23E1EBE10090FB56 /* Assets.xcassets */,
- 9C761E7E23E1EBE10090FB56 /* LaunchScreen.storyboard */,
- 9C761E8123E1EBE10090FB56 /* Info.plist */,
- );
- path = loginForm;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 9C761E6F23E1EBE00090FB56 /* loginForm */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 9C761E8423E1EBE10090FB56 /* Build configuration list for PBXNativeTarget "loginForm" */;
- buildPhases = (
- 9C761E6C23E1EBE00090FB56 /* Sources */,
- 9C761E6D23E1EBE00090FB56 /* Frameworks */,
- 9C761E6E23E1EBE00090FB56 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = loginForm;
- productName = loginForm;
- productReference = 9C761E7023E1EBE00090FB56 /* loginForm.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 9C761E6823E1EBE00090FB56 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 1130;
- LastUpgradeCheck = 1130;
- ORGANIZATIONNAME = prot;
- TargetAttributes = {
- 9C761E6F23E1EBE00090FB56 = {
- CreatedOnToolsVersion = 11.3.1;
- };
- };
- };
- buildConfigurationList = 9C761E6B23E1EBE00090FB56 /* Build configuration list for PBXProject "loginForm" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 9C761E6723E1EBE00090FB56;
- productRefGroup = 9C761E7123E1EBE00090FB56 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 9C761E6F23E1EBE00090FB56 /* loginForm */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 9C761E6E23E1EBE00090FB56 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9C761E8023E1EBE10090FB56 /* LaunchScreen.storyboard in Resources */,
- 9C761E7D23E1EBE10090FB56 /* Assets.xcassets in Resources */,
- 9C761E7B23E1EBE00090FB56 /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 9C761E6C23E1EBE00090FB56 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 9C761E7823E1EBE00090FB56 /* ViewController.swift in Sources */,
- 9C761E7423E1EBE00090FB56 /* AppDelegate.swift in Sources */,
- 9CB6A6AF23E42F6D00891466 /* MyViewController.swift in Sources */,
- 9C761E7623E1EBE00090FB56 /* SceneDelegate.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 9C761E7923E1EBE00090FB56 /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 9C761E7A23E1EBE00090FB56 /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "";
- };
- 9C761E7E23E1EBE10090FB56 /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 9C761E7F23E1EBE10090FB56 /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 9C761E8223E1EBE10090FB56 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 9C761E8323E1EBE10090FB56 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- MTL_ENABLE_DEBUG_INFO = NO;
- MTL_FAST_MATH = YES;
- SDKROOT = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 9C761E8523E1EBE10090FB56 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = X2648CBJ7V;
- INFOPLIST_FILE = loginForm/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = prot.loginForm;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 9C761E8623E1EBE10090FB56 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = X2648CBJ7V;
- INFOPLIST_FILE = loginForm/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = prot.loginForm;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 9C761E6B23E1EBE00090FB56 /* Build configuration list for PBXProject "loginForm" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 9C761E8223E1EBE10090FB56 /* Debug */,
- 9C761E8323E1EBE10090FB56 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 9C761E8423E1EBE10090FB56 /* Build configuration list for PBXNativeTarget "loginForm" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 9C761E8523E1EBE10090FB56 /* Debug */,
- 9C761E8623E1EBE10090FB56 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 9C761E6823E1EBE00090FB56 /* Project object */;
-}
diff --git a/lesson-02/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/lesson-02/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 0684c7c..0000000
--- a/lesson-02/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/lesson-02/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/lesson-02/loginForm/AppDelegate.swift b/lesson-02/loginForm/AppDelegate.swift
deleted file mode 100644
index 3528e17..0000000
--- a/lesson-02/loginForm/AppDelegate.swift
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// AppDelegate.swift
-// loginForm
-//
-// Created by prot on 30/01/2020.
-// Copyright © 2020 prot. All rights reserved.
-//
-
-import UIKit
-
-@UIApplicationMain
-class AppDelegate: UIResponder, UIApplicationDelegate {
-
-
-
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- // Override point for customization after application launch.
- return true
- }
-
- // MARK: UISceneSession Lifecycle
-
- func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
- // Called when a new scene session is being created.
- // Use this method to select a configuration to create the new scene with.
- return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
- }
-
- func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
- // Called when the user discards a scene session.
- // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
- // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
- }
-
-
-}
-
diff --git a/lesson-02/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json b/lesson-02/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index d8db8d6..0000000
--- a/lesson-02/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "iphone",
- "size" : "20x20",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "20x20",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "29x29",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "29x29",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "40x40",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "40x40",
- "scale" : "3x"
- },
- {
- "idiom" : "iphone",
- "size" : "60x60",
- "scale" : "2x"
- },
- {
- "idiom" : "iphone",
- "size" : "60x60",
- "scale" : "3x"
- },
- {
- "idiom" : "ipad",
- "size" : "20x20",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "20x20",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "29x29",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "40x40",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "40x40",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "76x76",
- "scale" : "1x"
- },
- {
- "idiom" : "ipad",
- "size" : "76x76",
- "scale" : "2x"
- },
- {
- "idiom" : "ipad",
- "size" : "83.5x83.5",
- "scale" : "2x"
- },
- {
- "idiom" : "ios-marketing",
- "size" : "1024x1024",
- "scale" : "1x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/lesson-02/loginForm/Base.lproj/LaunchScreen.storyboard b/lesson-02/loginForm/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index 865e932..0000000
--- a/lesson-02/loginForm/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lesson-02/loginForm/Base.lproj/Main.storyboard b/lesson-02/loginForm/Base.lproj/Main.storyboard
deleted file mode 100644
index 5b7e2d0..0000000
--- a/lesson-02/loginForm/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,385 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lesson-02/loginForm/Info.plist b/lesson-02/loginForm/Info.plist
deleted file mode 100644
index 2a3483c..0000000
--- a/lesson-02/loginForm/Info.plist
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- $(PRODUCT_BUNDLE_PACKAGE_TYPE)
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UIApplicationSceneManifest
-
- UIApplicationSupportsMultipleScenes
-
- UISceneConfigurations
-
- UIWindowSceneSessionRoleApplication
-
-
- UISceneConfigurationName
- Default Configuration
- UISceneDelegateClassName
- $(PRODUCT_MODULE_NAME).SceneDelegate
- UISceneStoryboardFile
- Main
-
-
-
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/lesson-02/loginForm/SceneDelegate.swift b/lesson-02/loginForm/SceneDelegate.swift
deleted file mode 100644
index 306c3b9..0000000
--- a/lesson-02/loginForm/SceneDelegate.swift
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// SceneDelegate.swift
-// loginForm
-//
-// Created by prot on 30/01/2020.
-// Copyright © 2020 prot. All rights reserved.
-//
-
-import UIKit
-
-class SceneDelegate: UIResponder, UIWindowSceneDelegate {
-
- var window: UIWindow?
-
-
- func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
- // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
- // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
- // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
- guard let _ = (scene as? UIWindowScene) else { return }
- }
-
- func sceneDidDisconnect(_ scene: UIScene) {
- // Called as the scene is being released by the system.
- // This occurs shortly after the scene enters the background, or when its session is discarded.
- // Release any resources associated with this scene that can be re-created the next time the scene connects.
- // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
- }
-
- func sceneDidBecomeActive(_ scene: UIScene) {
- // Called when the scene has moved from an inactive state to an active state.
- // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
- }
-
- func sceneWillResignActive(_ scene: UIScene) {
- // Called when the scene will move from an active state to an inactive state.
- // This may occur due to temporary interruptions (ex. an incoming phone call).
- }
-
- func sceneWillEnterForeground(_ scene: UIScene) {
- // Called as the scene transitions from the background to the foreground.
- // Use this method to undo the changes made on entering the background.
- }
-
- func sceneDidEnterBackground(_ scene: UIScene) {
- // Called as the scene transitions from the foreground to the background.
- // Use this method to save data, release shared resources, and store enough scene-specific state information
- // to restore the scene back to its current state.
- }
-
-
-}
-
diff --git a/lesson-01/.keep b/lesson-07/.keep
similarity index 100%
rename from lesson-01/.keep
rename to lesson-07/.keep
diff --git a/lesson-01/loginForm.xcodeproj/project.pbxproj b/lesson-07/loginForm.xcodeproj/project.pbxproj
similarity index 61%
rename from lesson-01/loginForm.xcodeproj/project.pbxproj
rename to lesson-07/loginForm.xcodeproj/project.pbxproj
index da61d7b..27a89ca 100644
--- a/lesson-01/loginForm.xcodeproj/project.pbxproj
+++ b/lesson-07/loginForm.xcodeproj/project.pbxproj
@@ -7,19 +7,47 @@
objects = {
/* Begin PBXBuildFile section */
+ 9C2E833923FFCCB000BD244F /* testTableViewHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C2E833823FFCCB000BD244F /* testTableViewHeader.swift */; };
+ 9C2E833B23FFD83300BD244F /* TestTableViewHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9C2E833A23FFD83300BD244F /* TestTableViewHeader.xib */; };
+ 9C2E836024007D2F00BD244F /* NewsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C2E835F24007D2F00BD244F /* NewsViewController.swift */; };
+ 9C2E836224007E5900BD244F /* NewsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C2E836124007E5900BD244F /* NewsCell.swift */; };
+ 9C43514C23F2A79000FBFC58 /* Groups.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C43514B23F2A79000FBFC58 /* Groups.swift */; };
+ 9C4AC87323F161CB00BFF5E7 /* LoginFormController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC87223F161CB00BFF5E7 /* LoginFormController.swift */; };
+ 9C4AC87723F165E300BFF5E7 /* FriendsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC87623F165E300BFF5E7 /* FriendsTableViewController.swift */; };
+ 9C4AC87923F167FF00BFF5E7 /* SubscriptionTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC87823F167FF00BFF5E7 /* SubscriptionTableViewController.swift */; };
+ 9C4AC87D23F168BC00BFF5E7 /* AllGroupsTableController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC87C23F168BC00BFF5E7 /* AllGroupsTableController.swift */; };
+ 9C4AC88823F1855000BFF5E7 /* FriendsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC88723F1855000BFF5E7 /* FriendsCell.swift */; };
+ 9C4AC88A23F1858000BFF5E7 /* GroupsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC88923F1858000BFF5E7 /* GroupsCell.swift */; };
+ 9C4AC88C23F1864B00BFF5E7 /* FriendsCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC88B23F1864B00BFF5E7 /* FriendsCollectionCell.swift */; };
+ 9C4AC88F23F1A0ED00BFF5E7 /* friendsStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC88E23F1A0ED00BFF5E7 /* friendsStruct.swift */; };
+ 9C4AC89123F1B19B00BFF5E7 /* FriendCollectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4AC89023F1B19B00BFF5E7 /* FriendCollectionController.swift */; };
+ 9C6C403D24052C7600460F66 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C6C403C24052C7600460F66 /* SettingsViewController.swift */; };
9C761E7423E1EBE00090FB56 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7323E1EBE00090FB56 /* AppDelegate.swift */; };
9C761E7623E1EBE00090FB56 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */; };
- 9C761E7823E1EBE00090FB56 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C761E7723E1EBE00090FB56 /* ViewController.swift */; };
9C761E7B23E1EBE00090FB56 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7923E1EBE00090FB56 /* Main.storyboard */; };
9C761E7D23E1EBE10090FB56 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7C23E1EBE10090FB56 /* Assets.xcassets */; };
9C761E8023E1EBE10090FB56 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9C761E7E23E1EBE10090FB56 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 9C2E833823FFCCB000BD244F /* testTableViewHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = testTableViewHeader.swift; sourceTree = ""; };
+ 9C2E833A23FFD83300BD244F /* TestTableViewHeader.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestTableViewHeader.xib; sourceTree = ""; };
+ 9C2E835F24007D2F00BD244F /* NewsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsViewController.swift; sourceTree = ""; };
+ 9C2E836124007E5900BD244F /* NewsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsCell.swift; sourceTree = ""; };
+ 9C43514B23F2A79000FBFC58 /* Groups.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Groups.swift; sourceTree = ""; };
+ 9C4AC87223F161CB00BFF5E7 /* LoginFormController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginFormController.swift; sourceTree = ""; };
+ 9C4AC87623F165E300BFF5E7 /* FriendsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendsTableViewController.swift; sourceTree = ""; };
+ 9C4AC87823F167FF00BFF5E7 /* SubscriptionTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionTableViewController.swift; sourceTree = ""; };
+ 9C4AC87C23F168BC00BFF5E7 /* AllGroupsTableController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllGroupsTableController.swift; sourceTree = ""; };
+ 9C4AC88723F1855000BFF5E7 /* FriendsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendsCell.swift; sourceTree = ""; };
+ 9C4AC88923F1858000BFF5E7 /* GroupsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupsCell.swift; sourceTree = ""; };
+ 9C4AC88B23F1864B00BFF5E7 /* FriendsCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendsCollectionCell.swift; sourceTree = ""; };
+ 9C4AC88E23F1A0ED00BFF5E7 /* friendsStruct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = friendsStruct.swift; sourceTree = ""; };
+ 9C4AC89023F1B19B00BFF5E7 /* FriendCollectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendCollectionController.swift; sourceTree = ""; };
+ 9C6C403C24052C7600460F66 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = ""; };
9C761E7023E1EBE00090FB56 /* loginForm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = loginForm.app; sourceTree = BUILT_PRODUCTS_DIR; };
9C761E7323E1EBE00090FB56 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
- 9C761E7723E1EBE00090FB56 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
9C761E7A23E1EBE00090FB56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
9C761E7C23E1EBE10090FB56 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
9C761E7F23E1EBE10090FB56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
@@ -37,6 +65,40 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 9C43514D23F2C12100FBFC58 /* Model */ = {
+ isa = PBXGroup;
+ children = (
+ 9C4AC88E23F1A0ED00BFF5E7 /* friendsStruct.swift */,
+ 9C43514B23F2A79000FBFC58 /* Groups.swift */,
+ );
+ path = Model;
+ sourceTree = "";
+ };
+ 9C4AC87E23F1698B00BFF5E7 /* Controllers */ = {
+ isa = PBXGroup;
+ children = (
+ 9C2E835F24007D2F00BD244F /* NewsViewController.swift */,
+ 9C4AC87623F165E300BFF5E7 /* FriendsTableViewController.swift */,
+ 9C4AC89023F1B19B00BFF5E7 /* FriendCollectionController.swift */,
+ 9C4AC87823F167FF00BFF5E7 /* SubscriptionTableViewController.swift */,
+ 9C4AC87C23F168BC00BFF5E7 /* AllGroupsTableController.swift */,
+ 9C4AC87223F161CB00BFF5E7 /* LoginFormController.swift */,
+ 9C6C403C24052C7600460F66 /* SettingsViewController.swift */,
+ );
+ path = Controllers;
+ sourceTree = "";
+ };
+ 9C4AC88D23F1865800BFF5E7 /* Cell */ = {
+ isa = PBXGroup;
+ children = (
+ 9C2E836124007E5900BD244F /* NewsCell.swift */,
+ 9C4AC88723F1855000BFF5E7 /* FriendsCell.swift */,
+ 9C4AC88923F1858000BFF5E7 /* GroupsCell.swift */,
+ 9C4AC88B23F1864B00BFF5E7 /* FriendsCollectionCell.swift */,
+ );
+ path = Cell;
+ sourceTree = "";
+ };
9C761E6723E1EBE00090FB56 = {
isa = PBXGroup;
children = (
@@ -58,8 +120,12 @@
children = (
9C761E7323E1EBE00090FB56 /* AppDelegate.swift */,
9C761E7523E1EBE00090FB56 /* SceneDelegate.swift */,
- 9C761E7723E1EBE00090FB56 /* ViewController.swift */,
+ 9C4AC87E23F1698B00BFF5E7 /* Controllers */,
+ 9C4AC88D23F1865800BFF5E7 /* Cell */,
+ 9C43514D23F2C12100FBFC58 /* Model */,
9C761E7923E1EBE00090FB56 /* Main.storyboard */,
+ 9C2E833823FFCCB000BD244F /* testTableViewHeader.swift */,
+ 9C2E833A23FFD83300BD244F /* TestTableViewHeader.xib */,
9C761E7C23E1EBE10090FB56 /* Assets.xcassets */,
9C761E7E23E1EBE10090FB56 /* LaunchScreen.storyboard */,
9C761E8123E1EBE10090FB56 /* Info.plist */,
@@ -125,6 +191,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 9C2E833B23FFD83300BD244F /* TestTableViewHeader.xib in Resources */,
9C761E8023E1EBE10090FB56 /* LaunchScreen.storyboard in Resources */,
9C761E7D23E1EBE10090FB56 /* Assets.xcassets in Resources */,
9C761E7B23E1EBE00090FB56 /* Main.storyboard in Resources */,
@@ -138,9 +205,22 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 9C761E7823E1EBE00090FB56 /* ViewController.swift in Sources */,
+ 9C2E833923FFCCB000BD244F /* testTableViewHeader.swift in Sources */,
+ 9C4AC87323F161CB00BFF5E7 /* LoginFormController.swift in Sources */,
+ 9C4AC88C23F1864B00BFF5E7 /* FriendsCollectionCell.swift in Sources */,
+ 9C4AC89123F1B19B00BFF5E7 /* FriendCollectionController.swift in Sources */,
+ 9C2E836224007E5900BD244F /* NewsCell.swift in Sources */,
9C761E7423E1EBE00090FB56 /* AppDelegate.swift in Sources */,
+ 9C4AC88A23F1858000BFF5E7 /* GroupsCell.swift in Sources */,
+ 9C6C403D24052C7600460F66 /* SettingsViewController.swift in Sources */,
+ 9C4AC87723F165E300BFF5E7 /* FriendsTableViewController.swift in Sources */,
9C761E7623E1EBE00090FB56 /* SceneDelegate.swift in Sources */,
+ 9C4AC87D23F168BC00BFF5E7 /* AllGroupsTableController.swift in Sources */,
+ 9C4AC88F23F1A0ED00BFF5E7 /* friendsStruct.swift in Sources */,
+ 9C4AC87923F167FF00BFF5E7 /* SubscriptionTableViewController.swift in Sources */,
+ 9C2E836024007D2F00BD244F /* NewsViewController.swift in Sources */,
+ 9C4AC88823F1855000BFF5E7 /* FriendsCell.swift in Sources */,
+ 9C43514C23F2A79000FBFC58 /* Groups.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -287,6 +367,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = X2648CBJ7V;
INFOPLIST_FILE = loginForm/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -305,6 +386,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = X2648CBJ7V;
INFOPLIST_FILE = loginForm/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
diff --git a/lesson-01/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/lesson-07/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from lesson-01/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to lesson-07/loginForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/lesson-01/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/lesson-07/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from lesson-01/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to lesson-07/loginForm.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/lesson-01/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/lesson-07/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from lesson-01/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to lesson-07/loginForm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/lesson-01/loginForm/AppDelegate.swift b/lesson-07/loginForm/AppDelegate.swift
similarity index 100%
rename from lesson-01/loginForm/AppDelegate.swift
rename to lesson-07/loginForm/AppDelegate.swift
diff --git a/lesson-01/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json b/lesson-07/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from lesson-01/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to lesson-07/loginForm/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/lesson-01/loginForm/Assets.xcassets/Contents.json b/lesson-07/loginForm/Assets.xcassets/Contents.json
similarity index 100%
rename from lesson-01/loginForm/Assets.xcassets/Contents.json
rename to lesson-07/loginForm/Assets.xcassets/Contents.json
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/1111.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/1111.jpg
new file mode 100644
index 0000000..2065c1b
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/1111.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/Contents.json
new file mode 100644
index 0000000..43bd984
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/1111.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "1111.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Ben.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Ben.jpg
new file mode 100644
index 0000000..c604339
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Ben.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Contents.json
new file mode 100644
index 0000000..4e4ba40
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/Ben.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Ben.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Cat.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Cat.jpg
new file mode 100644
index 0000000..ea8f406
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Cat.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Contents.json
new file mode 100644
index 0000000..3c64410
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/Cat.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Cat.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-02/loginForm/Assets.xcassets/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/Contents.json
similarity index 100%
rename from lesson-02/loginForm/Assets.xcassets/Contents.json
rename to lesson-07/loginForm/Assets.xcassets/Friends/Contents.json
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Contents.json
new file mode 100644
index 0000000..862740c
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Jessica.jpeg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Jessica.jpeg b/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Jessica.jpeg
new file mode 100644
index 0000000..d11bad6
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/Jessica.imageset/Jessica.jpeg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Contents.json
new file mode 100644
index 0000000..69ade85
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Jony.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Jony.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Jony.jpg
new file mode 100644
index 0000000..64a2546
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/Jony.imageset/Jony.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/Contents.json
new file mode 100644
index 0000000..61df0bd
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "duck.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/duck.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/duck.jpg
new file mode 100644
index 0000000..808e319
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/duck.imageset/duck.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/Contents.json
new file mode 100644
index 0000000..a0a50ef
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "man.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/man.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/man.jpg
new file mode 100644
index 0000000..178ba49
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/man.imageset/man.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/Contents.json
new file mode 100644
index 0000000..be352ab
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "reneg.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/reneg.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/reneg.jpg
new file mode 100644
index 0000000..3a90a1b
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/reneg.imageset/reneg.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/Contents.json
new file mode 100644
index 0000000..fa96e70
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "timon.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/timon.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/timon.jpg
new file mode 100644
index 0000000..d4188ca
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/timon.imageset/timon.jpg differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/Contents.json
new file mode 100644
index 0000000..9a3d83d
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "wolf.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/wolf.jpg b/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/wolf.jpg
new file mode 100644
index 0000000..a2eb652
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Friends/wolf.imageset/wolf.jpg differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/Contents.json"
new file mode 100644
index 0000000..30703b0
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Глаза1.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/\320\223\320\273\320\260\320\267\320\2601.jpg" "b/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/\320\223\320\273\320\260\320\267\320\2601.jpg"
new file mode 100644
index 0000000..c19ac09
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Friends/\320\223\320\273\320\260\320\267\320\2601.imageset/\320\223\320\273\320\260\320\267\320\2601.jpg" differ
diff --git a/lesson-07/loginForm/Assets.xcassets/Groups/Contents.json b/lesson-07/loginForm/Assets.xcassets/Groups/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Groups/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/Contents.json
new file mode 100644
index 0000000..0a8fb08
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "party.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/party.jpg b/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/party.jpg
new file mode 100644
index 0000000..493f240
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/Groups/party.imageset/party.jpg differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/Contents.json"
new file mode 100644
index 0000000..36f933f
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "гепард.jpeg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/\320\263\320\265\320\277\320\260\321\200\320\264.jpeg" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/\320\263\320\265\320\277\320\260\321\200\320\264.jpeg"
new file mode 100644
index 0000000..2e600f5
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\263\320\265\320\277\320\260\321\200\320\264.imageset/\320\263\320\265\320\277\320\260\321\200\320\264.jpeg" differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/Contents.json"
new file mode 100644
index 0000000..57cc4e0
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "мощь.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/\320\274\320\276\321\211\321\214.jpg" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/\320\274\320\276\321\211\321\214.jpg"
new file mode 100644
index 0000000..f0dc418
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\320\276\321\211\321\214.imageset/\320\274\320\276\321\211\321\214.jpg" differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/Contents.json"
new file mode 100644
index 0000000..0a552f3
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "мышь.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/\320\274\321\213\321\210\321\214.jpg" "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/\320\274\321\213\321\210\321\214.jpg"
new file mode 100644
index 0000000..4e0f80b
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Groups/\320\274\321\213\321\210\321\214.imageset/\320\274\321\213\321\210\321\214.jpg" differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/Contents.json"
new file mode 100644
index 0000000..74a0851
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "справ.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/\321\201\320\277\321\200\320\260\320\262.jpg" "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/\321\201\320\277\321\200\320\260\320\262.jpg"
new file mode 100644
index 0000000..126a81e
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\201\320\277\321\200\320\260\320\262.imageset/\321\201\320\277\321\200\320\260\320\262.jpg" differ
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/Contents.json" "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/Contents.json"
new file mode 100644
index 0000000..92d45c8
--- /dev/null
+++ "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/Contents.json"
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "траншея.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git "a/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.jpg" "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.jpg"
new file mode 100644
index 0000000..fe538f7
Binary files /dev/null and "b/lesson-07/loginForm/Assets.xcassets/Groups/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.imageset/\321\202\321\200\320\260\320\275\321\210\320\265\321\217.jpg" differ
diff --git a/lesson-07/loginForm/Assets.xcassets/space.imageset/Contents.json b/lesson-07/loginForm/Assets.xcassets/space.imageset/Contents.json
new file mode 100644
index 0000000..d0d6c72
--- /dev/null
+++ b/lesson-07/loginForm/Assets.xcassets/space.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "space.jpg",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/lesson-07/loginForm/Assets.xcassets/space.imageset/space.jpg b/lesson-07/loginForm/Assets.xcassets/space.imageset/space.jpg
new file mode 100644
index 0000000..8366f86
Binary files /dev/null and b/lesson-07/loginForm/Assets.xcassets/space.imageset/space.jpg differ
diff --git a/lesson-01/loginForm/Base.lproj/LaunchScreen.storyboard b/lesson-07/loginForm/Base.lproj/LaunchScreen.storyboard
similarity index 100%
rename from lesson-01/loginForm/Base.lproj/LaunchScreen.storyboard
rename to lesson-07/loginForm/Base.lproj/LaunchScreen.storyboard
diff --git a/lesson-07/loginForm/Base.lproj/Main.storyboard b/lesson-07/loginForm/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..6e404c1
--- /dev/null
+++ b/lesson-07/loginForm/Base.lproj/Main.storyboard
@@ -0,0 +1,807 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lesson-07/loginForm/Cell/FriendsCell.swift b/lesson-07/loginForm/Cell/FriendsCell.swift
new file mode 100644
index 0000000..1a03fd1
--- /dev/null
+++ b/lesson-07/loginForm/Cell/FriendsCell.swift
@@ -0,0 +1,78 @@
+//
+// FriendsCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class FriendsCell: UITableViewCell {
+
+ @IBOutlet weak var shadowView:ShadowView!
+ @IBOutlet weak var friendNameLabel: UILabel!
+ @IBOutlet weak var imageFriendView: UIImageView!
+
+ override func layoutSublayers(of layer: CALayer) {
+ imageFriendView.layer.cornerRadius = 35
+ shadowView.backgroundColor = .white
+ shadowView.animation()
+
+
+ let tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap(_:)))
+ imageFriendView.isUserInteractionEnabled = true
+ imageFriendView.addGestureRecognizer(tapGesture)
+
+ }
+
+ @objc func onTap(_ sender: UITapGestureRecognizer){
+ print("Сжимаем картинку")
+
+ UIView.animate(withDuration: 0.7,
+ delay: 0,
+ usingSpringWithDamping: 0.3,
+ initialSpringVelocity: 20,
+ animations: {
+ self.shadowView.transform = .init (scaleX: 0.85, y: 0.85)
+ self.shadowView.layer.shadowOpacity = 0
+
+ })
+
+ UIView.animate(withDuration: 0.7,
+ delay: 0,
+ animations: {
+ self.shadowView.transform = .init (scaleX: 1, y: 1)
+ self.shadowView.layer.shadowOpacity = 1
+ })
+ }
+
+ override func prepareForReuse() {
+ super.prepareForReuse()
+
+ friendNameLabel.text = nil
+ imageFriendView.image = nil
+
+ }
+
+}
+
+@IBDesignable class ShadowView: UIView{
+
+ @IBInspectable var color:UIColor = .black
+ @IBInspectable var opacity:Float = 1
+ @IBInspectable var radius:CGFloat = 10
+
+ func animation() {
+ layer.cornerRadius = 34
+ layer.shadowColor = color.cgColor
+ layer.shadowOpacity = opacity
+ layer.shadowOffset = CGSize(width: 4, height: 4)
+ layer.shadowRadius = radius
+ backgroundColor = .white
+
+ }
+
+}
+
+
diff --git a/lesson-07/loginForm/Cell/FriendsCollectionCell.swift b/lesson-07/loginForm/Cell/FriendsCollectionCell.swift
new file mode 100644
index 0000000..8ed9776
--- /dev/null
+++ b/lesson-07/loginForm/Cell/FriendsCollectionCell.swift
@@ -0,0 +1,102 @@
+//
+// FriendsCollectionCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class FriendsCollectionCell: UICollectionViewCell {
+
+ @IBOutlet var friendImageView: UIImageView!
+ @IBOutlet var likeImage: UIImageView!
+ @IBOutlet var countLikeLabel: UILabel!
+
+ var count = 0
+
+ override func layoutSublayers(of layer: CALayer) {
+
+
+
+ let tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap(_:)))
+
+ likeImage.isUserInteractionEnabled = true
+ likeImage.addGestureRecognizer(tapGesture)
+
+
+
+ }
+
+ @objc func onTap(_ sender: UITapGestureRecognizer){
+ let like = likeImage
+ if count == 0 {
+ count+=1
+ countLikeLabel.text = "\(count)"
+ print("Like")
+ //пружинка
+ UIView.animate(withDuration: 0.5,
+ delay: 0,
+ usingSpringWithDamping: 0.2,
+ initialSpringVelocity: 15,
+ animations: {
+ self.likeImage.transform = .init(scaleX: 0.8, y: 0.8)
+ })
+ //возврат размера
+ UIView.animate(withDuration: 0.5,
+ delay: 0,
+ animations: {
+ self.likeImage.transform = .init(scaleX: 1, y: 1)
+ })
+ //смена цвета
+ UIView.transition(with: likeImage, duration: 0.1, options: .transitionCrossDissolve, animations: {
+ self.likeImage.image = UIImage(systemName: "heart.fill")
+ like?.tintColor = .red
+ })
+ //смена цвета лейбла
+ UIView.transition(with: countLikeLabel, duration: 0.1, options: .transitionCrossDissolve, animations: {
+ self.countLikeLabel.textColor = .red
+ })
+
+
+ }else {
+ count = 0
+ countLikeLabel.text = "\(count)"
+ print("- Like")
+ //
+ UIView.animate(withDuration: 0.5,
+ delay: 0,
+ usingSpringWithDamping: 0.2,
+ initialSpringVelocity: 15,
+ animations: {
+ self.likeImage.transform = .init(scaleX: 0.8, y: 0.8)
+ })
+ //
+ UIView.animate(withDuration: 0.5,
+ delay: 0,
+ animations: {
+ self.likeImage.transform = .init(scaleX: 1, y: 1)
+ })
+ //
+ UIView.transition(with: likeImage, duration: 0.1, options: .transitionCrossDissolve, animations: {
+ self.likeImage.image = UIImage(systemName: "heart")
+ like?.tintColor = .blue
+ })
+ UIView.transition(with: countLikeLabel, duration: 0.1, options: .transitionCrossDissolve, animations: {
+ self.countLikeLabel.textColor = .black
+ })
+
+ }
+ }
+ // Стартовые значения аутлетов при переиспользовании ячейки
+ override func prepareForReuse() {
+ super.prepareForReuse()
+
+ friendImageView.image = nil
+ likeImage.image = nil
+ countLikeLabel.text = nil
+
+ }
+
+}
diff --git a/lesson-07/loginForm/Cell/GroupsCell.swift b/lesson-07/loginForm/Cell/GroupsCell.swift
new file mode 100644
index 0000000..d4075c4
--- /dev/null
+++ b/lesson-07/loginForm/Cell/GroupsCell.swift
@@ -0,0 +1,54 @@
+//
+// GroupsCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class GroupsCell: UITableViewCell {
+
+ @IBOutlet weak var groupNameLabel: UILabel!
+ @IBOutlet weak var groupImageView: UIImageView!
+
+ override func layoutSubviews() {
+ groupImageView.layer.cornerRadius = 42
+
+ let tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap(_:)))
+ groupImageView.isUserInteractionEnabled = true
+ groupImageView.addGestureRecognizer(tapGesture)
+
+ }
+
+ override func prepareForReuse() {
+ super.prepareForReuse()
+
+ groupNameLabel.text = nil
+ groupImageView.image = nil
+
+ }
+
+ @objc func onTap(_ sender: UITapGestureRecognizer){
+ print("Сжимаем картинку")
+
+ UIView.animate(withDuration: 1,
+ delay: 0,
+ usingSpringWithDamping: 0.8,
+ initialSpringVelocity: 10,
+ animations: {
+ self.groupImageView.transform = .init(scaleX: 0.9, y: 0.9)
+ })
+
+ UIView.animate(withDuration: 1,
+ delay: 0,
+ animations: {
+ self.groupImageView.transform = .init(scaleX: 1, y: 1)
+ })
+ }
+
+
+
+
+}
diff --git a/lesson-07/loginForm/Cell/NewsCell.swift b/lesson-07/loginForm/Cell/NewsCell.swift
new file mode 100644
index 0000000..9bf57e2
--- /dev/null
+++ b/lesson-07/loginForm/Cell/NewsCell.swift
@@ -0,0 +1,15 @@
+//
+// NewsCell.swift
+// loginForm
+//
+// Created by prot on 22/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class NewsCell: UITableViewCell {
+
+
+
+}
diff --git a/lesson-07/loginForm/Cell/NewsCellTableViewCell.swift b/lesson-07/loginForm/Cell/NewsCellTableViewCell.swift
new file mode 100644
index 0000000..82d8110
--- /dev/null
+++ b/lesson-07/loginForm/Cell/NewsCellTableViewCell.swift
@@ -0,0 +1,15 @@
+//
+// NewsCellTableViewCell.swift
+// loginForm
+//
+// Created by prot on 22/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class NewsCellTableViewCell: UITableViewCell {
+
+ @IBOutlet weak var imageViewNews:UIImageView!
+
+}
diff --git a/lesson-07/loginForm/Controllers/AboutFriendsCollectionController.swift b/lesson-07/loginForm/Controllers/AboutFriendsCollectionController.swift
new file mode 100644
index 0000000..f7cd08e
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/AboutFriendsCollectionController.swift
@@ -0,0 +1,86 @@
+//
+// AboutFriendsCollectionController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+class AboutFriendsCollectionController: UICollectionViewController {
+
+ var aboutFriendName: String?
+
+
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ }
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using [segue destinationViewController].
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+ // MARK: UICollectionViewDataSource
+
+ override func numberOfSections(in collectionView: UICollectionView) -> Int {
+ // #warning Incomplete implementation, return the number of sections
+ return 1
+ }
+
+
+ override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of items
+ return 20
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+ let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "FriendsCollectionCell", for: indexPath) as! FriendsCollectionCell
+
+ // Configure the cell
+
+ return cell
+ }
+
+ // MARK: UICollectionViewDelegate
+
+ /*
+ // Uncomment this method to specify if the specified item should be highlighted during tracking
+ override func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool {
+ return true
+ }
+ */
+
+ /*
+ // Uncomment this method to specify if the specified item should be selected
+ override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
+ return true
+ }
+ */
+
+ /*
+ // Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
+ override func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
+ return false
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
+ return false
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) {
+
+ }
+ */
+
+}
+
diff --git a/lesson-07/loginForm/Controllers/AllGroupsTableController.swift b/lesson-07/loginForm/Controllers/AllGroupsTableController.swift
new file mode 100644
index 0000000..99e267d
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/AllGroupsTableController.swift
@@ -0,0 +1,173 @@
+//
+// AllGroupsTableController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class AllGroupsTableController: UITableViewController {
+
+ @IBOutlet weak var searchBarAllGroup: UISearchBar!
+
+ var allGroupsMassive = [
+
+ Group(name: "Party", imageGroups: UIImage(named: "party")!),
+ Group(name: "Мохнатая мышь", imageGroups: UIImage(named: "мышь")!),
+ Group(name: "Справедливый выбор", imageGroups: UIImage(named: "справ")!),
+ Group(name: "Мощные ребята", imageGroups: UIImage(named: "мощь")!),
+ Group(name: "Траншея моего отца", imageGroups: UIImage(named: "траншея")!),
+ Group(name: "Человек vs гепард", imageGroups: UIImage(named: "гепард")!),
+ Group(name: "Молодой", imageGroups: UIImage(named: "party")!),
+ Group(name: "Жарища", imageGroups: UIImage(named: "мышь")!),
+ Group(name: "Как сделать нормальный поиск?", imageGroups: UIImage(named: "справ")!),
+ Group(name: "Всю ночь делал", imageGroups: UIImage(named: "мощь")!),
+ Group(name: "Как не умереть за Xcodom?", imageGroups: UIImage(named: "траншея")!),
+ Group(name: "Пот и кровь", imageGroups: UIImage(named: "гепард")!),
+ Group(name: "Развивая бессоницу", imageGroups: UIImage(named: "party")!),
+ Group(name: "Подсел на героин", imageGroups: UIImage(named: "мышь")!),
+ Group(name: "Перегон авто", imageGroups: UIImage(named: "справ")!),
+ Group(name: "Не смотря на все остальное", imageGroups: UIImage(named: "мощь")!),
+ Group(name: "Я продолжаю это делать", imageGroups: UIImage(named: "траншея")!),
+ Group(name: "А на самом деле, все в порядке", imageGroups: UIImage(named: "гепард")!)
+ ]
+
+ var searching = false
+ var searchAns = [String]()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Uncomment the following line to preserve selection between presentations
+ // self.clearsSelectionOnViewWillAppear = false
+
+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+ // self.navigationItem.rightBarButtonItem = self.editButtonItem
+ }
+
+ // MARK: - Table view data source
+
+// override func numberOfSections(in tableView: UITableView) -> Int {
+// // #warning Incomplete implementation, return the number of sections
+// return 1
+// }
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of rows
+ if searching {
+ return searchAns.count
+ }else {
+ return allGroupsMassive.count
+ }
+ }
+
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ guard let cell = tableView.dequeueReusableCell(withIdentifier: "GroupsCell", for: indexPath) as? GroupsCell else {
+ preconditionFailure("Нет связи с GroupsCell")
+ }
+
+ if searching {
+ let allGroup = searchAns[indexPath.row]
+ cell.groupNameLabel.text = allGroup
+ for i in allGroupsMassive{
+ if allGroup == i.name{
+ cell.groupImageView.image = i.imageGroups
+ }
+ }
+
+ }else {
+ let allGroup = allGroupsMassive[indexPath.row]
+ cell.groupNameLabel.text = allGroup.name
+ cell.groupImageView.image = allGroup.imageGroups
+ }
+
+ return cell
+ }
+ /*
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
+
+ // Configure the cell...
+
+ return cell
+ }
+ */
+
+ /*
+ // Override to support conditional editing of the table view.
+ override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+ */
+
+ /*
+ // Override to support editing the table view.
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ if editingStyle == .delete {
+ // Delete the row from the data source
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ } else if editingStyle == .insert {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+ }
+ */
+
+ /*
+ // Override to support rearranging the table view.
+ override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
+
+ }
+ */
+
+ /*
+ // Override to support conditional rearranging of the table view.
+ override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the item to be re-orderable.
+ return true
+ }
+ */
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
+extension AllGroupsTableController: UISearchBarDelegate {
+
+ func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String){
+
+ var searchMassive = [String]()
+ for i in allGroupsMassive{
+ searchMassive.append(i.name)
+ }
+ searchAns = searchMassive.filter({$0.prefix(searchText.count) == searchText})
+
+ searching = true
+ print(searchAns)
+ tableView.reloadData()
+
+ }
+
+
+ func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
+
+ hideKeyboard()
+ searching = false
+ searchBarAllGroup.text = ""
+ tableView.reloadData()
+ }
+
+ @objc func hideKeyboard() {
+ self.searchBarAllGroup.endEditing(true)
+ }
+
+}
diff --git a/lesson-07/loginForm/Controllers/FriendCollectionController.swift b/lesson-07/loginForm/Controllers/FriendCollectionController.swift
new file mode 100644
index 0000000..562cfb5
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/FriendCollectionController.swift
@@ -0,0 +1,95 @@
+//
+// FriendCollectionController.swift
+// loginForm
+//
+// Created by prot on 11/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+
+class FriendCollectionController: UICollectionViewController {
+
+ var collectionFriendName: String?
+ var collectionFriendImage: UIImage?
+
+
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ title = collectionFriendName
+
+ }
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using [segue destinationViewController].
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+ // MARK: UICollectionViewDataSource
+
+ override func numberOfSections(in collectionView: UICollectionView) -> Int {
+ // #warning Incomplete implementation, return the number of sections
+ return 1
+ }
+
+
+ override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of items
+ return 1
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+ let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "FriendsCollectionCell", for: indexPath) as! FriendsCollectionCell
+
+ cell.friendImageView.image = collectionFriendImage
+
+ return cell
+ }
+
+
+
+
+
+ // MARK: UICollectionViewDelegate
+
+ /*
+ // Uncomment this method to specify if the specified item should be highlighted during tracking
+ override func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool {
+ return true
+ }
+ */
+
+ /*
+ // Uncomment this method to specify if the specified item should be selected
+ override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
+ return true
+ }
+ */
+
+ /*
+ // Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
+ override func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
+ return false
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
+ return false
+ }
+
+ override func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) {
+
+ }
+ */
+
+ }
+
+
diff --git a/lesson-07/loginForm/Controllers/FriendsTableViewController.swift b/lesson-07/loginForm/Controllers/FriendsTableViewController.swift
new file mode 100644
index 0000000..802c835
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/FriendsTableViewController.swift
@@ -0,0 +1,287 @@
+//
+// FriendsTableViewController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+
+class FriendsTableViewController: UITableViewController{
+
+ @IBOutlet weak var searhBar: UISearchBar!
+
+ var sections = [Section]()
+ var searchFriend = [Search]()
+
+ var friendsMassive = [
+ Friend(name: "Vlad Miller", imageFriends: UIImage(named: "Глаза1")!),
+ Friend(name: "Viktor Funduk", imageFriends: UIImage(named: "1111")!),
+ Friend(name: "Skala Jony", imageFriends: UIImage(named: "Jony")!),
+ Friend(name: "Ben Ten", imageFriends: UIImage(named: "Ben")!),
+ Friend(name: "Jessica Alba", imageFriends: UIImage(named: "Jessica")!),
+ Friend(name: "Антошка Картошка", imageFriends: UIImage(named: "Cat")!),
+ Friend(name: "Николай Погребняк", imageFriends: UIImage(named: "reneg")!),
+ Friend(name: "Станислав Копченый", imageFriends: UIImage(named: "duck")!),
+ Friend(name: "Виталий Негодяев", imageFriends: UIImage(named: "timon")!),
+ Friend(name: "Hello Word", imageFriends: UIImage(named: "man")!),
+ Friend(name: "Life is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Petr 1 2", imageFriends: UIImage(named: "Jessica")!),
+ Friend(name: "Mife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Kife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Sife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Wife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Gife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Zife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Rife is Strange", imageFriends: UIImage(named: "wolf")!),
+ Friend(name: "Oife is Strange", imageFriends: UIImage(named: "wolf")!)
+ ]
+
+ var searchAns = [String]()
+ var nameFriend = [String]()
+ var searching = false
+
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ tableView.register(UINib(nibName: "TestTableViewHeader", bundle: nil), forHeaderFooterViewReuseIdentifier: "HeaderView")
+
+ for i in friendsMassive{
+ nameFriend.append(i.name)
+ }
+ //Сортировка
+ let groupedDictionary = Dictionary(grouping: nameFriend, by: {String($0.prefix(1))})
+
+ //print(groupedDictionary)
+ let keys = groupedDictionary.keys.sorted()
+ //print(keys)
+
+ sections = keys.map{ Section(letter: $0, names: groupedDictionary[$0]!.sorted()) }
+ tableView.reloadData()
+ //print(sections)
+ //Сортировка
+
+
+
+ }
+
+
+
+ override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+
+
+
+ }
+
+
+
+
+
+
+ // MARK: - Table view data source
+
+ override func numberOfSections(in tableView: UITableView) -> Int {
+
+ if searching {
+ return searchFriend.count
+ }else {
+ return sections.count
+ }
+
+
+ }
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+
+ if searching {
+ return searchFriend[section].names.count
+ }else {
+ return sections[section].names.count
+ }
+ }
+
+ override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+ guard let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "HeaderView") as? TestTableViewHeader else {
+ preconditionFailure("нет связи HeaderView")
+ }
+ if searching {
+ headerView.someLabel.text = searchFriend[section].letter
+ }else {
+ headerView.someLabel.text = sections[section].letter
+ }
+
+ return headerView
+ }
+
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ guard let cell = tableView.dequeueReusableCell(withIdentifier: "FriendsCell", for: indexPath) as? FriendsCell else {
+ preconditionFailure("нет связи FriendsCell")
+ }
+ // Если есть буква в сеарч баре тогда
+ if searching {
+ let section = searchFriend[indexPath.section]
+ let friend = section.names[indexPath.row]//id
+ cell.friendNameLabel.text = friend// имя
+ //картинка
+ for i in friendsMassive{
+ if i.name == friend{
+ cell.imageFriendView.image = i.imageFriends
+ }
+ }
+ }else {
+ let section = sections[indexPath.section]
+ let friend = section.names[indexPath.row]//id
+ cell.friendNameLabel.text = friend// имя
+ //картинка
+ for i in friendsMassive{
+ if i.name == friend{
+ cell.imageFriendView.image = i.imageFriends
+ }
+ }
+ }
+
+
+ return cell
+ }
+
+ // override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
+ // return sections[section].letter
+ // }
+ //
+ override func sectionIndexTitles(for tableView: UITableView) -> [String]? {
+ if searching {
+ return searchFriend.compactMap{$0.letter.uppercased()}
+ }else {
+ return sections.compactMap{$0.letter.uppercased()}
+ }
+
+ }
+
+
+ /*
+ // Override to support conditional editing of the table view.
+ override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+ */
+
+
+ // Override to support editing the table view.
+ //функция удаления эллементов свайпом
+ // override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ // var section = sections[indexPath.section]
+ // var nameFriend = section.names[indexPath.row]
+ // if editingStyle == .delete {
+ // // Delete the row from the data source
+ //
+ // sections.remove(at: indexPath.section)
+ // print("Удален друг: " + String(nameFriend) + " ((((")
+ // tableView.deleteRows(at: [IndexPath(row : indexPath.row, section : indexPath.section)], with: .fade)
+ // tableView.reloadData()
+ // }
+ // }
+
+ /*
+ // Override to support rearranging the table view.
+ override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
+
+ }
+ */
+
+ /*
+ // Override to support conditional rearranging of the table view.
+ override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the item to be re-orderable.
+ return true
+ }
+ */
+
+
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ //Иницилизация при переходе с индификатором
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ if segue.identifier == "Show Friends",
+ let indexPath = tableView.indexPathForSelectedRow {
+
+ if searching {
+ let section = searchFriend[indexPath.section] // id элемента
+ let titleFriendName = section.names[indexPath.row]
+ let destinationViewController = segue.destination as? FriendCollectionController //определение куда передаем инфу
+ destinationViewController?.collectionFriendName = titleFriendName
+ //картинка
+ for i in friendsMassive{
+ if i.name == titleFriendName{
+ destinationViewController?.collectionFriendImage = i.imageFriends
+ }
+ }
+ }else {
+ let section = sections[indexPath.section] // id элемента
+ let titleFriendName = section.names[indexPath.row]
+ let destinationViewController = segue.destination as? FriendCollectionController //определение куда передаем инфу
+ destinationViewController?.collectionFriendName = titleFriendName
+ //картинка
+ for i in friendsMassive{
+ if i.name == titleFriendName{
+ destinationViewController?.collectionFriendImage = i.imageFriends
+ }
+ }
+ }
+
+ }
+ }
+
+
+}
+// Поиск, реализация ху-вая но я по другому неумею
+extension FriendsTableViewController : UISearchBarDelegate {
+
+ func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
+
+ var searchMassive = [String]()
+ for i in friendsMassive{
+ searchMassive.append(i.name)
+ }
+ //Поиск
+ searchAns = searchMassive.filter({$0.contains(searchText)})
+ //Сортировка под новую структуру
+ let groupedDictionary = Dictionary(grouping: searchAns, by: {String($0.prefix(1))})
+ let keys = groupedDictionary.keys.sorted()
+ searchFriend = keys.map{ Search(letter: $0, names: groupedDictionary[$0]!.sorted()) }
+
+
+ searching = true
+ print(searchAns)
+ tableView.reloadData()
+
+ }
+
+ func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
+
+ hideKeyboard()
+ searching = false
+ searchBar.text = ""
+ tableView.reloadData()
+
+ }
+ //Закрыть клавиатуру
+ @objc func hideKeyboard() {
+ self.searhBar.endEditing(true)
+ }
+
+
+
+
+
+}
+
diff --git a/lesson-07/loginForm/Controllers/LoginFormController.swift b/lesson-07/loginForm/Controllers/LoginFormController.swift
new file mode 100644
index 0000000..5156c35
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/LoginFormController.swift
@@ -0,0 +1,107 @@
+//
+// LoginFormController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class LoginFormController: UIViewController {
+
+ @IBOutlet weak var scrollView: UIScrollView!
+ @IBOutlet weak var textFieldLogin: UITextField!
+ @IBOutlet weak var textFieldPass: UITextField!
+ @IBOutlet weak var labelLogin: UILabel!
+ @IBOutlet weak var buttonIn : UIButton!
+
+
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ let tapGesture = UITapGestureRecognizer(target: self, action: #selector(hideKeyboard)) //переменная для закрытия клавитуры при тапе
+ scrollView.addGestureRecognizer(tapGesture) // закрытие клавитуры
+
+ buttonIn.layer.cornerRadius = 20
+ }
+
+ // Ошибка авторизации
+ func showInError() {
+
+ let alertVC = UIAlertController(title: "Ошибка", message: "Неверный логин или пароль", preferredStyle: .alert)
+ let action = UIAlertAction(title: "Ok", style: .default) { _ in
+ print("Ок clicked")
+ }
+ alertVC.addAction(action)
+
+ present(alertVC, animated: true, completion: nil)
+ }
+
+
+ func checkLogin() -> Bool {
+ if let login = textFieldLogin.text,
+ let pass = textFieldPass.text {
+
+ if login == "admin", pass == "admin" {
+ print("Успешная авторизация")
+ return true
+ }else {
+ print("Не успешная авторизация")
+ return false
+ }
+ };return false
+ }
+
+
+ override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
+ if checkLogin(){
+ return true
+ }else{
+ showInError()
+ return false
+ }
+
+ }
+
+ override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+
+ //скрыть navigation bar
+ navigationController?.setNavigationBarHidden(true, animated: false)
+
+ // Подписываемся на два уведомления: одно приходит при появлении клавиатуры
+
+ NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShown(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
+ // Второе — когда она пропадает
+ NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil)
+ }
+ // Когда клавиатура появляется
+ @objc func keyboardWillShown ( notification : Notification) {
+ // Получаем размер клавиатуры
+ let info = notification.userInfo! as NSDictionary
+ let size = (info.value(forKey: UIResponder.keyboardFrameEndUserInfoKey) as! NSValue).cgRectValue.size
+ let contentInsents = UIEdgeInsets(top: 0, left: 0, bottom: size.height, right: 0)
+ // Добавляем отступ внизу UIScrollView, равный размеру клавиатуры
+ self.scrollView?.contentInset = contentInsents
+ self.scrollView.scrollIndicatorInsets = contentInsents
+
+ }
+ //Когда клавиатура исчезает
+ @objc func keyboardWillHide ( notification : Notification) {
+ // Устанавливаем отступ внизу UIScrollView, равный 0
+ scrollView.contentInset = .zero
+
+ }
+ //клик по пустому месту на экране сворачивает клаву
+ @objc func hideKeyboard() {
+ self.scrollView.endEditing(true)
+ }
+
+ //выход на cnfhnjdsq контроллер
+ @IBAction func exit(unwindSegue: UIStoryboardSegue) {
+ print("Welocme back")
+ }
+
+ }
diff --git a/lesson-07/loginForm/Controllers/NewsTableViewController.swift b/lesson-07/loginForm/Controllers/NewsTableViewController.swift
new file mode 100644
index 0000000..1ea1b83
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/NewsTableViewController.swift
@@ -0,0 +1,102 @@
+//
+// NewsTableViewController.swift
+// loginForm
+//
+// Created by prot on 22/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class NewsTableViewController: UITableViewController {
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ tableView.register(UINib(nibName: "NewsHeaderClass", bundle: nil), forHeaderFooterViewReuseIdentifier: "HeaderNewsView")
+ // Uncomment the following line to preserve selection between presentations
+ // self.clearsSelectionOnViewWillAppear = false
+
+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+ // self.navigationItem.rightBarButtonItem = self.editButtonItem
+ }
+
+ // MARK: - Table view data source
+
+ override func numberOfSections(in tableView: UITableView) -> Int {
+ // #warning Incomplete implementation, return the number of sections
+ return 1
+ }
+
+
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of rows
+ return 1
+ }
+
+ override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+ guard let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "HeaderNewsView") as? NewsHeaderClass else {
+ preconditionFailure("нет связи HeaderView")
+ }
+ return headerView
+ }
+
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ guard let cell = tableView.dequeueReusableCell(withIdentifier: "NewsCell", for: indexPath) as? NewsCellTableViewCell else {
+ preconditionFailure("нет связи NewsCell")
+ }
+
+
+
+ return cell
+ }
+
+
+ /*
+ // Override to support conditional editing of the table view.
+ override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+ */
+
+ /*
+ // Override to support editing the table view.
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ if editingStyle == .delete {
+ // Delete the row from the data source
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ } else if editingStyle == .insert {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+ }
+ */
+
+ /*
+ // Override to support rearranging the table view.
+ override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
+
+ }
+ */
+
+ /*
+ // Override to support conditional rearranging of the table view.
+ override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the item to be re-orderable.
+ return true
+ }
+ */
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
diff --git a/lesson-07/loginForm/Controllers/NewsViewController.swift b/lesson-07/loginForm/Controllers/NewsViewController.swift
new file mode 100644
index 0000000..04b345a
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/NewsViewController.swift
@@ -0,0 +1,48 @@
+//
+// NewsViewController.swift
+// loginForm
+//
+// Created by prot on 22/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class NewsViewController: UIViewController {
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Do any additional setup after loading the view.
+ }
+
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
+extension NewsViewController: UITableViewDelegate, UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return 1
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ guard let cell = tableView.dequeueReusableCell(withIdentifier: "NewsCell", for: indexPath) as? NewsCell else {
+ preconditionFailure("нет связи FriendsCell")
+ }
+ return cell
+ }
+
+
+
+
+
+
+}
diff --git a/lesson-07/loginForm/Controllers/SettingsViewController.swift b/lesson-07/loginForm/Controllers/SettingsViewController.swift
new file mode 100644
index 0000000..ef59fed
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/SettingsViewController.swift
@@ -0,0 +1,55 @@
+//
+// SettingsViewController.swift
+// loginForm
+//
+// Created by prot on 25/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class SettingsViewController: UIViewController {
+
+ @IBOutlet weak var loadView1: UIView!
+ @IBOutlet weak var loadView2: UIView!
+ @IBOutlet weak var loadView3: UIView!
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ downloadView()
+
+ }
+
+ func downloadView () {
+ loadView1.layer.cornerRadius = 10
+ loadView2.layer.cornerRadius = 10
+ loadView3.layer.cornerRadius = 10
+
+ UIView.animate(withDuration: 0.4, delay: 0, options: [.repeat, .autoreverse], animations: {
+ self.loadView1.alpha = 0.5
+
+ })
+ UIView.animate(withDuration: 0.4, delay: 0.2, options: [.repeat, .autoreverse], animations: {
+ self.loadView2.alpha = 0.5
+
+
+ })
+ UIView.animate(withDuration: 0.4, delay: 0.3, options: [.repeat, .autoreverse], animations: {
+ self.loadView3.alpha = 0.5
+
+
+ })
+ }
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
diff --git a/lesson-07/loginForm/Controllers/SubscriptionTableViewController.swift b/lesson-07/loginForm/Controllers/SubscriptionTableViewController.swift
new file mode 100644
index 0000000..cc638d8
--- /dev/null
+++ b/lesson-07/loginForm/Controllers/SubscriptionTableViewController.swift
@@ -0,0 +1,181 @@
+//
+// SubscriptionTableViewController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class SubscriptionTableViewController: UITableViewController {
+
+ @IBOutlet weak var searBarGroup:UISearchBar!
+
+ var groupsMassive = [
+ Group(name: "Party", imageGroups: UIImage(named: "party")!)
+ ]
+ var searching = false
+ var searchAns = [String]()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Uncomment the following line to preserve selection between presentations
+ // self.clearsSelectionOnViewWillAppear = false
+
+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+ // self.navigationItem.rightBarButtonItem = self.editButtonItem
+ }
+
+
+ //сигуэй при выходе с контроллера, добавление элементов на другой контролллер
+ @IBAction func addGroup(segue: UIStoryboardSegue) {
+ var nameGroups = [String]() //массив для перебора имен в массиве groupsMassive
+ for i in groupsMassive{
+ nameGroups.append(i.name)
+ }
+ if segue.identifier == "addGroup" {
+ // Ссылка на контроллер с которого переход
+ guard let allGroupsController = segue.source as? AllGroupsTableController else { return }
+ //получаем индекс ячейки с массива
+ if let indexPath = allGroupsController.tableView.indexPathForSelectedRow {
+ //получаем группу по индексу
+ let addGroup = allGroupsController.allGroupsMassive[indexPath.row]
+ // добавляем в массив
+ let nameAllGroup = addGroup.name
+ if !nameGroups.contains(nameAllGroup) {
+ groupsMassive.append(addGroup)
+ print("Добавлен элемент: " + nameAllGroup)
+ }
+ }
+ //обновляем таблицу
+ tableView.reloadData()
+
+ }
+ }
+
+ //функция удаления элементов
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ let nameGroup = groupsMassive[indexPath.row]
+ // Если была нажата кнопка «Удалить»
+ if editingStyle == .delete {
+ // Удаляем из массива
+ groupsMassive.remove(at: indexPath.row)
+ print("Удален элемент: " + nameGroup.name)
+ // И удаляем строку из таблицы
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ }
+ }
+
+
+ // MARK: - Table view data source
+
+// override func numberOfSections(in tableView: UITableView) -> Int {
+// // #warning Incomplete implementation, return the number of sections
+// return 1
+// }
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of rows
+ if searching{
+ return searchAns.count
+ }else{
+ return groupsMassive.count
+ }
+
+ }
+
+
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ guard let cell = tableView.dequeueReusableCell(withIdentifier: "GroupsCell", for: indexPath) as? GroupsCell else {
+ preconditionFailure("No connect GroupCell")
+ }
+ if searching{
+ let subscriptionName = searchAns[indexPath.row]
+ cell.groupNameLabel.text = subscriptionName
+ for i in groupsMassive {
+ if subscriptionName == i.name{
+ cell.groupImageView.image = i.imageGroups
+ }
+ }
+ }else {
+ let subscriptionName = groupsMassive[indexPath.row]
+ cell.groupNameLabel.text = subscriptionName.name
+ cell.groupImageView.image = subscriptionName.imageGroups
+ }
+
+ return cell
+ }
+
+ /*
+ // Override to support conditional editing of the table view.
+ override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+ */
+
+ /*
+ // Override to support editing the table view.
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ if editingStyle == .delete {
+ // Delete the row from the data source
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ } else if editingStyle == .insert {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+ }
+ */
+
+ /*
+ // Override to support rearranging the table view.
+ override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
+
+ }
+ */
+
+ /*
+ // Override to support conditional rearranging of the table view.
+ override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the item to be re-orderable.
+ return true
+ }
+ */
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
+extension SubscriptionTableViewController:UISearchBarDelegate{
+
+ func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String){
+
+ let searchMassive = groupsMassive.map {$0.name}
+
+ searchAns = searchMassive.filter({$0.prefix(searchText.count) == searchText})
+
+ searching = true
+ print(searchAns)
+ tableView.reloadData()
+ }
+
+ func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
+
+ hideKeyboard()
+ searching = false
+ searBarGroup.text = ""
+ tableView.reloadData()
+ }
+
+ @objc func hideKeyboard() {
+ self.searBarGroup.endEditing(true)
+ }
+}
diff --git a/lesson-07/loginForm/FriendsAndGroupsCell.swift b/lesson-07/loginForm/FriendsAndGroupsCell.swift
new file mode 100644
index 0000000..4ca8d0c
--- /dev/null
+++ b/lesson-07/loginForm/FriendsAndGroupsCell.swift
@@ -0,0 +1,16 @@
+//
+// FriendsAndGroupsCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class FriendsAndGroupsCell: UITableViewCell {
+
+ @IBOutlet weak var subscrNameLabel: UILabel!
+ @IBOutlet weak var friendsNameLabel: UILabel!
+
+}
diff --git a/lesson-07/loginForm/FriendsTableController.swift b/lesson-07/loginForm/FriendsTableController.swift
new file mode 100644
index 0000000..0e1d4d7
--- /dev/null
+++ b/lesson-07/loginForm/FriendsTableController.swift
@@ -0,0 +1,96 @@
+//
+// FriendsTableController.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class FriendsTableController: UITableViewController {
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Uncomment the following line to preserve selection between presentations
+ // self.clearsSelectionOnViewWillAppear = false
+
+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+ // self.navigationItem.rightBarButtonItem = self.editButtonItem
+ }
+
+ override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+
+
+ }
+
+ // MARK: - Table view data source
+
+ override func numberOfSections(in tableView: UITableView) -> Int {
+ // #warning Incomplete implementation, return the number of sections
+ return 0
+ }
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ // #warning Incomplete implementation, return the number of rows
+ return 0
+ }
+
+ /*
+ override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
+
+ // Configure the cell...
+
+ return cell
+ }
+ */
+
+ /*
+ // Override to support conditional editing of the table view.
+ override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the specified item to be editable.
+ return true
+ }
+ */
+
+ /*
+ // Override to support editing the table view.
+ override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ if editingStyle == .delete {
+ // Delete the row from the data source
+ tableView.deleteRows(at: [indexPath], with: .fade)
+ } else if editingStyle == .insert {
+ // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+ }
+ }
+ */
+
+ /*
+ // Override to support rearranging the table view.
+ override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
+
+ }
+ */
+
+ /*
+ // Override to support conditional rearranging of the table view.
+ override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
+ // Return false if you do not want the item to be re-orderable.
+ return true
+ }
+ */
+
+ /*
+ // MARK: - Navigation
+
+ // In a storyboard-based application, you will often want to do a little preparation before navigation
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
+ // Get the new view controller using segue.destination.
+ // Pass the selected object to the new view controller.
+ }
+ */
+
+}
diff --git a/lesson-07/loginForm/FrindsAndGroupsCell.swift b/lesson-07/loginForm/FrindsAndGroupsCell.swift
new file mode 100644
index 0000000..a868756
--- /dev/null
+++ b/lesson-07/loginForm/FrindsAndGroupsCell.swift
@@ -0,0 +1,24 @@
+//
+// FrindsAndGroupsCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class FrindsAndGroupsCell: UITableViewCell {
+
+ override func awakeFromNib() {
+ super.awakeFromNib()
+ // Initialization code
+ }
+
+ override func setSelected(_ selected: Bool, animated: Bool) {
+ super.setSelected(selected, animated: animated)
+
+ // Configure the view for the selected state
+ }
+
+}
diff --git a/lesson-01/loginForm/Info.plist b/lesson-07/loginForm/Info.plist
similarity index 100%
rename from lesson-01/loginForm/Info.plist
rename to lesson-07/loginForm/Info.plist
diff --git a/lesson-07/loginForm/Model/Groups.swift b/lesson-07/loginForm/Model/Groups.swift
new file mode 100644
index 0000000..3aa129e
--- /dev/null
+++ b/lesson-07/loginForm/Model/Groups.swift
@@ -0,0 +1,15 @@
+//
+// Groups.swift
+// loginForm
+//
+// Created by prot on 11/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+struct Group {
+ let name: String
+ let imageGroups: UIImage
+}
diff --git a/lesson-07/loginForm/Model/friendsStruct.swift b/lesson-07/loginForm/Model/friendsStruct.swift
new file mode 100644
index 0000000..91ff81e
--- /dev/null
+++ b/lesson-07/loginForm/Model/friendsStruct.swift
@@ -0,0 +1,23 @@
+//
+// friendsStruct.swift
+// loginForm
+//
+// Created by prot on 11/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+struct Friend {
+ let name: String
+ let imageFriends: UIImage
+}
+struct Section {
+ var letter: String
+ var names: [String]
+}
+struct Search {
+ var letter: String
+ var names: [String]
+}
diff --git a/lesson-02/loginForm/MyViewController.swift b/lesson-07/loginForm/MyViewController.swift
similarity index 100%
rename from lesson-02/loginForm/MyViewController.swift
rename to lesson-07/loginForm/MyViewController.swift
diff --git a/lesson-01/loginForm/SceneDelegate.swift b/lesson-07/loginForm/SceneDelegate.swift
similarity index 100%
rename from lesson-01/loginForm/SceneDelegate.swift
rename to lesson-07/loginForm/SceneDelegate.swift
diff --git a/lesson-07/loginForm/TableCell.swift b/lesson-07/loginForm/TableCell.swift
new file mode 100644
index 0000000..d0b2dc6
--- /dev/null
+++ b/lesson-07/loginForm/TableCell.swift
@@ -0,0 +1,24 @@
+//
+// TableCell.swift
+// loginForm
+//
+// Created by prot on 10/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+class TableCell: UITableViewCell {
+
+ override func awakeFromNib() {
+ super.awakeFromNib()
+ // Initialization code
+ }
+
+ override func setSelected(_ selected: Bool, animated: Bool) {
+ super.setSelected(selected, animated: animated)
+
+ // Configure the view for the selected state
+ }
+
+}
diff --git a/lesson-07/loginForm/TestTableViewHeader.xib b/lesson-07/loginForm/TestTableViewHeader.xib
new file mode 100644
index 0000000..6241509
--- /dev/null
+++ b/lesson-07/loginForm/TestTableViewHeader.xib
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lesson-02/loginForm/ViewController.swift b/lesson-07/loginForm/ViewController.swift
similarity index 98%
rename from lesson-02/loginForm/ViewController.swift
rename to lesson-07/loginForm/ViewController.swift
index aec42a5..a57caf8 100644
--- a/lesson-02/loginForm/ViewController.swift
+++ b/lesson-07/loginForm/ViewController.swift
@@ -8,7 +8,7 @@
import UIKit
-class ViewController: UIViewController {
+class LoginFormController: UIViewController {
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var textFieldLogin: UITextField!
diff --git a/lesson-07/loginForm/test.xib b/lesson-07/loginForm/test.xib
new file mode 100644
index 0000000..75dea39
--- /dev/null
+++ b/lesson-07/loginForm/test.xib
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lesson-07/loginForm/testTableViewHeader.swift b/lesson-07/loginForm/testTableViewHeader.swift
new file mode 100644
index 0000000..f2199ac
--- /dev/null
+++ b/lesson-07/loginForm/testTableViewHeader.swift
@@ -0,0 +1,17 @@
+//
+// testTableViewHeader.swift
+// loginForm
+//
+// Created by prot on 21/02/2020.
+// Copyright © 2020 prot. All rights reserved.
+//
+
+import UIKit
+
+
+
+class TestTableViewHeader: UITableViewHeaderFooterView {
+ @IBOutlet weak var someLabel : UILabel!
+
+
+}
diff --git a/test.php b/test.php
deleted file mode 100644
index e69de29..0000000