我对iphone的发展有些新意,所以请耐心等待!
我有一个登录屏幕,连接到我开发的REST API.它来回发送json请求.基本上,当您单击LOGIN时,它会检查用户名/密码是否有效(显然).
这是我所拥有的基本逻辑:
- (IBAction)sendLoginJson:(id)sender {
// send JSON request to server.. etc
NSURLConnection *myConnection = [NSURLConnection connectionWithRequest:request delegate:self];
[myConnection start];
}
Run Code Online (Sandbox Code Playgroud)
然后去
- (void)connectionDidFinishLoading
// this is where I get the response from the server
Run Code Online (Sandbox Code Playgroud)
在确保正确验证登录后,如何切换到"DashboardViewController"?
谢谢!