我能够在我的项目中实现下面提到的库。使用的库:: https://github.com/rolandleth/LTHPasscodeViewController
输入密码并验证它是否正确后,我无法在输入密码后直接切换到选项卡栏活动,但如果我在两者之间使用 NSNotification,我可以转移控制权。
我的代码:
- (void) receiveTestNotification:(NSNotification *) notification
{
if ([[notification name] isEqualToString:@"TestNotification"])
NSLog (@"Successfully received the test notification!");
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
mainTabViewController *objSec=[storyboard instantiateViewControllerWithIdentifier:@"passID"];
[self.navigationController pushViewController:objSec animated:YES];
放置 NSLog 后,我也得到了日志输出,但选项卡视图没有出现。
有没有办法在输入密码后直接调用选项卡视图。
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receiveTestNotification:)
name:@"TestNotification"
object:nil];
Tabview 使用 StoryBoard 完成。