Trực tiếp đến ViewController của bạn một lần nữa. trong tình huống của tôi [self.view setNeedsDisplay];
và [self viewDidLoad]; [self viewWillAppear:YES];
không hoạt động, nhưng phương pháp bên dưới hoạt động.
Trong C Mục tiêu
UIStoryboard *MyStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil ];
UIViewController *vc = [MyStoryboard instantiateViewControllerWithIdentifier:@"ViewControllerStoryBoardID"];
[self presentViewController:vc animated:YES completion:nil];
Swift:
let secondViewController = self.storyboard!.instantiateViewControllerWithIdentifier("ViewControllerStoryBoardID")
self.presentViewController(secondViewController, animated: true, completion: nil)
Nguồn
2016-10-18 02:05:32
Làm cách nào để cập nhật dữ liệu của bạn - tôi giả sử bạn đang sử dụng viewDidAppear? – Till
Bạn không thể sử dụng NotificationCenter hoặc một giao thức để thông báo cho ViewController rằng bản cập nhật đã kết thúc? – Khal
@Khal Tôi chưa bao giờ sử dụng Trung tâm thông báo, bạn có thể chỉ cho tôi một hướng dẫn hoặc hướng dẫn không? @Tôi sử dụng 'viewWill/DidAppear' cũng như' loadView' và 'viewDidLoad'. –