Skip to content

montekaka/photog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

photog

One Month iOS tutorial

Day 3

Follow instruction from parse.com

Day 4

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.
        self.setupParse()
        
        self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
        
        if PFUser.currentUser() == nil{
            // TODO: present the main UI
            println("User does not exist")
        }
        else{
            // TODO: Present UI for logging in or creating an account
            println("We have an user")
        }
        
        return true
    }
    
func setupParse(){
        Parse.setApplicationId(_applicationID_, clientKey:_clientKey_)
}

Create a StartViewController file inherts from UIViewController with a xib file, and then add the following code

var startViewController = StartViewController(nibName:"StartViewController", bundle:nil)

if PFUser.currentUser() == nil{
    // TODO: present the main UI
    navigationController.viewControllers = [startViewController]
}
else{
    // TODO: Present UI for logging in or creating an account
    println("We have an user")
}
    self.window!.rootViewController = navigationController
    self.window!.makeKeyAndVisible()    

Day 5

Adding buttons to the login screen

Day 6

Add sign in and sign up buttons functions and connect them to the UI e.g.

@IBAction func didTapSignIn(sender: AnyObject){
    var viewController = AuthViewController(nibName:"AuthViewController", bundle:nil)
    self.navigationController!.pushViewController(viewController, animated: true)
}

Add AuthViewContrller.swift

About

One Month iOS tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published