IPhone Example : Login Page and then Navigate to another Screen (UI Table View) - cocoa-touch

I am an .Net Expert but a new to the IPhone App Development. Recently I have started workinf on Objective - c.
I need a help I need a example which shows a Login Screen and then Navigates to the another Screen (UITableView) when username and password and found correct.
As of now I am assuming that username and passwords are hardcoded in app.
I have tried to Design the Screen for Login UI but unable to Load the another ViewController but it wont worked
Can some one help me out with examples, Links?

You need to decide on a navigation paradigm for your app first. Normally in this case, you'd just use a UINavigationController and use the pushViewController method to push a new view into your app.
The UINavigationController acts as a stack of views onto which you can either push new views (in your case) or pop views. Other options you have are listed nicely here - http://flyosity.com/application-design/iphone-application-design-patterns.php
This could be of some help for the tableviewcontroller + UINavigationController - http://icodeblog.com/2008/08/03/iphone-programming-tutorial-transitioning-between-views/

Related

View size when subclassing PFLogInViewController

When subclassing PFLogInViewController for customization. How do I change the size of the view?
I have looked at this tutorial: https://parse.com/tutorials/login-and-signup-views
but it does not seem to have the answer.
My app is based on a UITabBarController and one of the tabs needs log in.
Nevertheless if the user cannot log in, he should still be able to use the other tabs.
In the present situation, when the user taps on the tab asking for login; he has to log in or kill the app to get out. Because the PFLogInViewController takes up all the screen and there is no way out by hitting a different tab (all covered).
This is obviously not very nice.
How can I keep the tabs at the bottom visible?
I tried to change the self.view.frame or the self.logInView.frame in the viewDidLoad method of my PFLogInViewController subclass, but it seems to have no effect at all.
Then you should make your app so that it doesn't start with the login viewcontroller, but rather opens to the parts that are available to all. Include some button or other mechanic to take the user to the login page.
You could include a button on the login page that says "Use the app anonymously" or similar, which triggers a segue to a main view. On subsequent app launches, the user is taken to this main view immediately. You would still need a way for the user to login later on.

Guided Access Mode implementation

I am running my app using base SDK 6.0 in XCode and then run the app in iOS 7.0(Device) after navigating to one or more screens then enable Guided Access Mode by pressing the home button thrice. Now the screen moves to MainViewController automatically and after that i am unable to navigate anywhere. The following Log can be seen in Console:Attempt to present a ViewController on another ViewController which is already presenting the ViewController.
Try putting this code in the - (void)viewDidAppear:(BOOL)animated method of your MainViewController.
[self.view.superview insertSubview:self.view atIndex:0];
Actually I was facing exactly same issue, as u described. And after research I found that, all the view hierarchy still exist in the memory, but mainViewController's view become the topmost view (Hiding others.). I do not have any logical explanation, why it is happening. I will post the details if I found any explanation.

iOS - Storyboards - Link the same UITableViewController to 2 different UITabBarControllers

I'm working on a navigation style iOS app using Xcode 4.3.2, SDK v5.1 and storyboards. The user can take several routes through the app but there is one particular table view scene that is used whichever route is taken. I therefore just want to have this scene defined once, but be visible as a tab page in more than 1 different tab bar controllers. The storyboard designer allows these relationships to be defined, but when the app is run the table view scene only appears as a tab button in the tab bar controller that it was most recently connected to.
Am I trying to achieve the impossible? I would have thought if storyboard lets me connect everything up then it should be achievable.
Many thanks,
Jonathan

MonoTouch: StoryBoarding - manual segues?

iPhone/iPad dev newb here...
I am using MonoTouch to create a universal iPad/iPhone storyboard app. In the primary view controller (RootViewController) the default auto-generated behavior is a table with a single cell "Detail" in it, which hardwires you to the next destination (DetailViewController).
I'd like to change this RootViewController to instead show a login control I've made extending UIViewController (LoginView). I have had some success putting the LoginView inside the RootViewController, but can't figure out how to make it 'segue' to DetailViewController. And upon watching how the iPad app works, where there is no segue (that I can see) between the two, am I going about this wrong?
To summarize: How do I enhance this storyboard app with a preceding login screen, reusing its contents/xib between the iPad and iPhone variant?
Apologies if this is a bit unclear and muddled.......
I have not tried a storyboard app in Monotouch yet, but I did spend a lot of time working out the best approach for a login screen for my application. What I ended up doing, which could work in your situation as well, is presenting the login screen as a Modal view. Once the user has successfully logged in, we then push the next appropriate view.
So if you are automatically pushed into the detail view by the storyboard viewcontroller, you could display the login dialog as a modal dialog from the detail view's DidLoad or DidAppear methods.

Need help with the tab bar and tab bar controller

My iPhone app has a login page (shocker i know) but when the user successfully logs in, I want a view with a tab bar at the bottom to load and populate the buttons with data from the specific user. I can not find any tutorials on the tab bar, just the tab bar controller and from what i've read and seen, you can only have a tab bar controller on the MainWindow.xib. If thats not true, please show me how to have a tab bar controller on a view other that the main window. This is driving me nuts. Beer on me for a solution. Thanks
I have the same exact thing going on in my app and I can sympathize with you. There really isn't much to go on out there.
For me, it starts in your AppDelegate. I would validate the login info there, if it was good, push out the tabbarcontroller. If not, just present the logincontroller instead. It can be a tad tricky, but if you start there, you should be able to use everything else to get what you need.
Use the AppDelegate to determine which controller to push. When you push the login and it is good, call back to your appdelegate to push the tab bar controller and kill off the login.
Hope this helps. Good Luck.
You certainly can have a tab bar controller in other places besides MainWindow.xib. An example of one being created programattically, is in View Controller Programming Guide for iOS. See the section on Creating a Tab Bar Interface Programmatically.
Now, you've probably seen this already, but the point is even though Apple's example is in applicationDidFinishLaunching, you could do it anywhere you launch a view controller, like in response to a button click.
A few things to consider though:
Tab bar view controllers aren't meant to be embedded inside a navigation controller (i believe it would give you errors). it's the other way around is recommended. It might make more sense to present a tab bar view controller modally.
In your specific case, it sounds like the best thing would be to keep it simple by letting the tab bar be the root view controller in the main window after all, and having your login screen be automatically popped up after launch (i.e present it modally) then after proper login, dismiss the log in screen to reveal the tab bar controller that was there all along.