我是这个开发的新手,我正在使用启动屏幕,但是我不知道如何在一定的时间内从一个视图控制器切换到另一个视图控制器...
[self performSegueWithIdentifier:@"nameOfYourSegue" sender:self];
我不知道如何增加时间。.....
答案 0 :(得分:0)
public class EnsureNotEmptyAttribute : ValidationAttribute
{
public override bool IsValid(object value)
{
var stringToTest = value as String;
if (!string.IsNullOrEmpty(stringToTest))
{
return true;
}
return false;
}
}
答案 1 :(得分:0)
您可以尝试
// delay 1 second
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[self performSegueWithIdentifier:@"segueID" sender:nil];
});
OR
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
UIViewController*vc = [self.storyboard instantiateViewControllerWithIdentifier:@"VCID"];
[self presentViewController:vc animated:YES completion:nil];
});
答案 2 :(得分:0)
将此代码添加到viewDidLoad
this.http.post('http://edomonitor.com/school-evaluation-api/retrieve_data.php',data, options)
.map(res => res.json())
.subscribe(res => {
loader.dismiss()
this.items=res.server_response;
console.log(this.items);
});
然后
[self performSelector:@selector(LoadMainPage:) withObject:nil afterDelay:3.0];
答案 3 :(得分:0)