I will give one translation example and explain it so that you can translate the other delegate methods:
- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView user: (id<FBGraphUser>)user;
- The method name begins with "loginViewFetchedUserInfo". It remains the same
- The parameter is a pointer of type "FDBLoginView". This will translate to the optional FBLoginView type, as it may be zero. The convention is to make it unplanned Unwrapped Optional, so it will become
FBLoginView! - The protocols themselves are related to Swift, so the user parameter will just become
FBGraphUser . - The first parameter in the swift method is considered to be just the internal name, so you can call anything for the parameter, but for consistency we will call it the same: "loginView"
- The second parameter in the fast method is considered internal and external. In the objective-c version, they turn out to be the same, so we can just use them once, and Swift will do this with both internal and external names
This leaves us with this translation:
func loginViewFetchedUserInto(loginView : FBLoginView!, user: FBGraphUser)
source share