can someone translate this C objective for me please
I am trying to add FBlogin to my app and I'm struggling because parses instructions are not complete. and the tutorial they have is for obj C
I am still new and teaching myself really so there are a lot of things I do not understand yet including how to use initializers and where to declare things, any help would be appreciated.
self.window.rootViewController = [
[UINavigationController alloc] initWithRootViewController: [
[LoginViewController alloc] init
]
];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
im having problems with the root view controller
import UIKit
@ UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UINavigationControllerDelegate {
var window: UIWindow
init(window: UIWindow) {
self.window = window
}
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject] ? ) - > Bool {
Parse.setApplicationId("myID", clientKey: "myKey")
PFFacebookUtils.initializeFacebook()
// Override point for customization after application launch.
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
var controller: UIViewController = UINavigationController()
var navController: UINavigationController = UINavigationController(rootViewController: controller)
self.window.rootViewController = UINavigationController(rootViewController: FBLoginView.self.init())
self.window.backgroundColor = UIColor()
self.window.makeKeyAndVisible()
return true
}
Aucun commentaire:
Enregistrer un commentaire