Skip to content

Commit 0d08c25

Browse files
🎉 setup incial do projeto
1 parent 1fe5059 commit 0d08c25

File tree

11 files changed

+65
-450
lines changed

11 files changed

+65
-450
lines changed

CheckboxDemoApp.xcodeproj/project.pbxproj

Lines changed: 10 additions & 260 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "AE62B441-6FFB-4CC6-82C3-E0C21CE858DC"
4+
type = "1"
5+
version = "2.0">
6+
</Bucket>

CheckboxDemoApp/Base.lproj/Main.storyboard

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// CheckboxButton.swift
3+
// CheckboxDemoApp
4+
//
5+
// Created by Paolo Prodossimo Lopes on 11/06/24.
6+
//
7+
8+
import UIKit
9+
10+
final class CheckboxButton: UIButton {
11+
12+
// Implemente a sua solução aqui
13+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// CheckboxViewController.swift
3+
// CheckboxDemoApp
4+
//
5+
// Created by Paolo Prodossimo Lopes on 11/06/24.
6+
//
7+
8+
import UIKit
9+
10+
class CheckboxViewController: UIViewController {
11+
12+
override func viewDidLoad() {
13+
super.viewDidLoad()
14+
view.backgroundColor = .white
15+
}
16+
17+
override func viewWillAppear(_ animated: Bool) {
18+
super.viewWillAppear(animated)
19+
let checkboxButton = CheckboxButton()
20+
checkboxButton.addTarget(self, action: #selector(checkboxButtonActionHandler), for: .touchUpInside)
21+
navigationItem.rightBarButtonItem = UIBarButtonItem(
22+
customView: checkboxButton
23+
)
24+
}
25+
26+
@objc private func checkboxButtonActionHandler(_ checkbox: CheckboxButton) {
27+
print("isSelected: \(checkbox.isSelected)")
28+
}
29+
}

CheckboxDemoApp/Info.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
<string>Default Configuration</string>
1616
<key>UISceneDelegateClassName</key>
1717
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
18-
<key>UISceneStoryboardFile</key>
19-
<string>Main</string>
2018
</dict>
2119
</array>
2220
</dict>

CheckboxDemoApp/SceneDelegate.swift

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
1111

1212
var window: UIWindow?
1313

14-
1514
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16-
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17-
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18-
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19-
guard let _ = (scene as? UIWindowScene) else { return }
20-
}
21-
22-
func sceneDidDisconnect(_ scene: UIScene) {
23-
// Called as the scene is being released by the system.
24-
// This occurs shortly after the scene enters the background, or when its session is discarded.
25-
// Release any resources associated with this scene that can be re-created the next time the scene connects.
26-
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27-
}
28-
29-
func sceneDidBecomeActive(_ scene: UIScene) {
30-
// Called when the scene has moved from an inactive state to an active state.
31-
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32-
}
33-
34-
func sceneWillResignActive(_ scene: UIScene) {
35-
// Called when the scene will move from an active state to an inactive state.
36-
// This may occur due to temporary interruptions (ex. an incoming phone call).
15+
guard let windowScene = (scene as? UIWindowScene) else { return }
16+
17+
window = UIWindow(windowScene: windowScene)
18+
window?.rootViewController = UINavigationController(
19+
rootViewController: CheckboxViewController()
20+
)
21+
window?.makeKeyAndVisible()
3722
}
38-
39-
func sceneWillEnterForeground(_ scene: UIScene) {
40-
// Called as the scene transitions from the background to the foreground.
41-
// Use this method to undo the changes made on entering the background.
42-
}
43-
44-
func sceneDidEnterBackground(_ scene: UIScene) {
45-
// Called as the scene transitions from the foreground to the background.
46-
// Use this method to save data, release shared resources, and store enough scene-specific state information
47-
// to restore the scene back to its current state.
48-
}
49-
50-
5123
}
52-

CheckboxDemoApp/ViewController.swift

Lines changed: 0 additions & 19 deletions
This file was deleted.

CheckboxDemoAppTests/CheckboxDemoAppTests.swift

Lines changed: 0 additions & 36 deletions
This file was deleted.

CheckboxDemoAppUITests/CheckboxDemoAppUITests.swift

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)