質問編集履歴
3
画像の挿入
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,8 @@
|
|
24
24
|
|
25
25
|
![イメージ説明](57b6a089abb14093fbdb5cfd3c24caf6.png)
|
26
26
|
|
27
|
+
![イメージ説明](0c47c3ddc41902e0cd6232022d9ada9e.png)
|
28
|
+
|
27
29
|
```swift
|
28
30
|
|
29
31
|
import UIKit!
|
2
詳細な説明の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,6 +8,12 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
メインのviewのID名がRootTabBarController
|
12
|
+
|
13
|
+
新規登録viewのクラス名がsignUpViewControllerです。
|
14
|
+
|
15
|
+
|
16
|
+
|
11
17
|
今発生している問題が、ログイン時のviewで新規会員登録ボタンを押し、新規登録のviewで"ユーザー名"、"メールアドレス"、"パスワード"、"パスワード(確認)"をそれぞれ入力した後に新規登録ボタンを押すと、メインのviewに切り替えたいのですが、errorがprintされてしまいます。
|
12
18
|
|
13
19
|
|
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -121,3 +121,85 @@
|
|
121
121
|
}
|
122
122
|
|
123
123
|
```
|
124
|
+
|
125
|
+
```swift
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
import UIKit
|
130
|
+
|
131
|
+
import CoreData
|
132
|
+
|
133
|
+
import NCMB
|
134
|
+
|
135
|
+
@UIApplicationMain
|
136
|
+
|
137
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
var window: UIWindow?
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
NCMB.setApplicationKey("2967bbec9e70b8d691b06dca02f21fe1b1e84f807c245a660e06c85839cfa2ea", clientKey: "1257f541876271709d05b9054223c70f542a17d48ae4d9af78802bf51e2b4b74")
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
let ud = UserDefaults.standard
|
156
|
+
|
157
|
+
let isLogin = ud.bool(forKey: "isLogin")
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
if isLogin == true {
|
162
|
+
|
163
|
+
//ログイン中だったら
|
164
|
+
|
165
|
+
self.window = UIWindow(frame: UIScreen.main.bounds)
|
166
|
+
|
167
|
+
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
|
168
|
+
|
169
|
+
let rootViewController = storyboard.instantiateViewController(withIdentifier: "RootTabBarController")
|
170
|
+
|
171
|
+
self.window?.rootViewController = rootViewController
|
172
|
+
|
173
|
+
self.window?.backgroundColor = UIColor.white
|
174
|
+
|
175
|
+
self.window?.makeKeyAndVisible()
|
176
|
+
|
177
|
+
} else {
|
178
|
+
|
179
|
+
//ログインしていなっかたら
|
180
|
+
|
181
|
+
self.window = UIWindow(frame: UIScreen.main.bounds)
|
182
|
+
|
183
|
+
let storyboard = UIStoryboard(name: "signIn", bundle: Bundle.main)
|
184
|
+
|
185
|
+
let rootViewController = storyboard.instantiateViewController(withIdentifier: "RootNavigationController")
|
186
|
+
|
187
|
+
self.window?.rootViewController = rootViewController
|
188
|
+
|
189
|
+
self.window?.backgroundColor = UIColor.white
|
190
|
+
|
191
|
+
self.window?.makeKeyAndVisible()
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
return true
|
202
|
+
|
203
|
+
}
|
204
|
+
|
205
|
+
```
|