Михаил Капелько 1 year ago
parent
commit
041cdc0dea
6 changed files with 66 additions and 12 deletions
  1. +20
    -0
      iOS/app/MMMemory.xcodeproj/project.pbxproj
  2. BIN
      iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate
  3. +1
    -12
      iOS/src/AppDelegate.swift
  4. +29
    -0
      iOS/src/Main/Main.Section16Buttons.swift
  5. +15
    -0
      iOS/src/Main/Main.VC.swift
  6. +1
    -0
      iOS/src/Main/Main.swift

+ 20
- 0
iOS/app/MMMemory.xcodeproj/project.pbxproj View File

@@ -8,24 +8,41 @@

/* Begin PBXBuildFile section */
1F083A14C69F20A6BA92A63E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16A7DD61EF6CD4FB4E3DE25 /* AppDelegate.swift */; };
A6E529FBA0467549623E44A5 /* Main.Section16Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 032C8E87061765718F550E70 /* Main.Section16Buttons.swift */; };
AEDC5FB14A2EE027C2F7FDA7 /* Main.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC87DC40D65BB2748668CE65 /* Main.swift */; };
B19B3998FA2BA651ACB1E53C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C1742EFC5A1E818780679340 /* Assets.xcassets */; };
CAFD870CA84084E45011CC23 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4E32B0495E4BCEA4EE0508D4 /* LaunchScreen.storyboard */; };
D65ED8EB653B36E6C4094996 /* Main.VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EAF8AC4A5A1BCE77350565E /* Main.VC.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
032C8E87061765718F550E70 /* Main.Section16Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.Section16Buttons.swift; sourceTree = "<group>"; };
4E32B0495E4BCEA4EE0508D4 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
6EAF8AC4A5A1BCE77350565E /* Main.VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.VC.swift; sourceTree = "<group>"; };
9D774FEE86833E8A0A74387C /* App.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
C1742EFC5A1E818780679340 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
CC87DC40D65BB2748668CE65 /* Main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.swift; sourceTree = "<group>"; };
F16A7DD61EF6CD4FB4E3DE25 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXGroup section */
43F40869C11E8EE85952F2E9 /* Main */ = {
isa = PBXGroup;
children = (
032C8E87061765718F550E70 /* Main.Section16Buttons.swift */,
CC87DC40D65BB2748668CE65 /* Main.swift */,
6EAF8AC4A5A1BCE77350565E /* Main.VC.swift */,
);
path = Main;
sourceTree = "<group>";
};
667BC26EA8068A9FA707FC02 /* src */ = {
isa = PBXGroup;
children = (
F16A7DD61EF6CD4FB4E3DE25 /* AppDelegate.swift */,
C1742EFC5A1E818780679340 /* Assets.xcassets */,
4E32B0495E4BCEA4EE0508D4 /* LaunchScreen.storyboard */,
43F40869C11E8EE85952F2E9 /* Main */,
);
name = src;
path = ../src;
@@ -110,6 +127,9 @@
buildActionMask = 2147483647;
files = (
1F083A14C69F20A6BA92A63E /* AppDelegate.swift in Sources */,
A6E529FBA0467549623E44A5 /* Main.Section16Buttons.swift in Sources */,
D65ED8EB653B36E6C4094996 /* Main.VC.swift in Sources */,
AEDC5FB14A2EE027C2F7FDA7 /* Main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};


BIN
iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate View File


+ 1
- 12
iOS/src/AppDelegate.swift View File

@@ -10,21 +10,10 @@ extension AppDelegate {
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let vc = UIViewController()
vc.view.backgroundColor = .white
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = vc
window?.rootViewController = Main.VC()
window?.makeKeyAndVisible()

return true
}
}

extension AppDelegate {
private func setupMemory() {
/*
let w = Converter.World(converterModel)
converterS = Converter.Service(w)
*/
}
}

+ 29
- 0
iOS/src/Main/Main.Section16Buttons.swift View File

@@ -0,0 +1,29 @@
import UIKit

// MARK: - Протоколы

protocol MainSection16Buttons {
}

// MARK: - Реализация

extension Main {
enum Section16Buttons {
static func setupCore(_ core: Main.VC) {
// Создаём 16 кнопок.
for i in 0..<16 {
let btn = UIButton()
core.buttons.append(btn)
btn.tag = i
//????btn.addTarget(self, action: #selector(selectButton), for: .touchUpInside)
core.view.addSubview(btn)
}
// Расставляем их в сетке 4x4.
for btn in core.buttons {
btn.frame = CGRect(x: 0, y: btn.tag * 60, width: 50, height: 50)
btn.backgroundColor = .blue
}
}
}
}

+ 15
- 0
iOS/src/Main/Main.VC.swift View File

@@ -0,0 +1,15 @@
import UIKit

extension Main {
class VC: UIViewController {
var buttons = [UIButton]()

override func viewDidLoad() {
super.viewDidLoad()

view.backgroundColor = .white

Main.Section16Buttons.setupCore(self)
}
}
}

+ 1
- 0
iOS/src/Main/Main.swift View File

@@ -0,0 +1 @@
enum Main { }

Loading…
Cancel
Save