質問編集履歴

1

余計なコードの削除、画像の挿入

2020/08/13 04:24

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -424,79 +424,37 @@
424
424
 
425
425
 
426
426
 
427
- if let user = NCMBUser.current(){
427
+
428
-
429
- nameLabel.text = user.object(forKey: "userName") as? String
428
+
430
-
431
- profileTextView.text = user.object(forKey: "profileSentence") as? String
429
+
432
-
433
- navigationItem.title = user.object(forKey: "searchId") as? String
430
+
434
-
435
- let file = NCMBFile.file(withName: NCMBUser.current()?.objectId, data: nil) as! NCMBFile
431
+
436
-
437
-
438
-
439
- file.getDataInBackground { (data, error) in
432
+
440
-
441
- if error != nil {
433
+
442
-
443
- print(error)
434
+
444
-
445
- }else{
446
-
447
- if data != nil{
448
-
449
- let image = UIImage(data: data!)
450
-
451
- self.mainImageView.image = image
452
-
453
- }
435
+ }
454
-
455
-
456
-
457
- }
436
+
458
-
459
- }
437
+
460
-
461
-
462
-
463
- }else{
438
+
464
-
439
+
440
+
465
- let storyboard = UIStoryboard(name: "SignIn", bundle: Bundle.main)
441
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
466
-
442
+
467
- let rootViewController = storyboard.instantiateViewController(withIdentifier: "RootNavigationController")
443
+ if segue.identifier == "fromUserPageToFollower"{
468
-
444
+
469
- UIApplication.shared.keyWindow?.rootViewController = rootViewController
445
+ let destinationcontroller = segue.destination as! FollowerViewController
470
-
471
-
472
-
473
- let ud = UserDefaults.standard
446
+
474
-
447
+
448
+
475
- ud.set(false, forKey: "isLogin")
449
+ destinationcontroller.passedTappedUser = NCMBUser.current()
476
-
477
- ud.synchronize()
478
450
 
479
451
  }
480
452
 
481
453
 
482
454
 
483
-
484
-
485
-
486
-
487
-
488
-
489
- }
490
-
491
-
492
-
493
-
494
-
495
- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
496
-
497
- if segue.identifier == "fromUserPageToFollower"{
455
+ if segue.identifier == "fromUserPageToFollowing"{
498
-
456
+
499
- let destinationcontroller = segue.destination as! FollowerViewController
457
+ let destinationcontroller = segue.destination as! FollowingViewController
500
458
 
501
459
 
502
460
 
@@ -504,18 +462,6 @@
504
462
 
505
463
  }
506
464
 
507
-
508
-
509
- if segue.identifier == "fromUserPageToFollowing"{
510
-
511
- let destinationcontroller = segue.destination as! FollowingViewController
512
-
513
-
514
-
515
- destinationcontroller.passedTappedUser = NCMBUser.current()
516
-
517
- }
518
-
519
465
  }
520
466
 
521
467
 
@@ -563,3 +509,9 @@
563
509
  の部分は呼ばれていることが確認できません。
564
510
 
565
511
  また、今はとりあえずプロフィール文のみの変更をモーダルを閉じ次第反映させようとしています。よろしくお願いします。
512
+
513
+
514
+
515
+ 以下の画像のようにプロフィールページから編集ページはモーダルで繋がれています
516
+
517
+ ![](f5e76ed2dbe85cb63aa401c9329d0364.png)