我使用Objective-C下面的代码来弹出特定的代码ViewController.
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[AnOldViewController class]]) {
//Do not forget to import AnOldViewController.h
[self.navigationController popToViewController:controller
animated:YES];
break;
}
}
Run Code Online (Sandbox Code Playgroud)
我怎么能在Swift中做到这一点?
我的日期格式如下: Wednesday, 22 Apr, 2015, 12:39 PM
我如何分开如下的日期和时间?
>日期: - 2015年4月22日
>时间: - 下午12:39