我老老实实地花了几个小时试图让它发挥作用.不幸的是,Facebook和App Link的文档还不够清晰.甚至来自F8的App Links视频.
应用要求:
迄今取得的进展:
我正在使用以下代码来创建托管的应用程序链接(因为我只有移动内容),根据FB开发人员的网站在发布iOS SDK下.
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
@"{My app name}", @"name",
{custom URL}, @"al:iphone:url",
@"{app store ID}", @"al:iphone:app_store_id",
@"{My app name}", @"al:iphone:app_name",
@"{\"should_fallback\": false}", @"web",
fbAccessToken, @"access_token",
nil
];
/* make the API call */
[FBRequestConnection startWithGraphPath:@"/{FB app id}/app_link_hosts"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
NSLog(@"Result = %@",result);
if(error) NSLog(@"error = %@",error); …
Run Code Online (Sandbox Code Playgroud) 我在导航控制器中有两个视图控制器.第一个视图控制器有一个带按钮的菜单.按此按钮移动到第二个视图控制器并将html字符串加载到UIWebView中.没有其他任何东西被加载到webview,只是一个带有html代码的简单NSString.基本上我正在使用webview作为其中一个uiviews的子视图制作翻转卡片(两个视图).
这是代码:
containerView = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 280, 280)];
[self.view addSubview:containerView];
frontView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 280)];
frontView.layer.cornerRadius = 10;
frontView.layer.masksToBounds = YES;
[frontView setBackgroundColor:[UIColor whiteColor]];
backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 280)];
backView.layer.cornerRadius = 10;
backView.layer.masksToBounds = YES;
[backView setBackgroundColor:[UIColor yellowColor]];
[containerView addSubview:frontView];
webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 280, 280)];
webView.scalesPageToFit = YES;
webView.userInteractionEnabled = NO;
NSString *htmlString = @"<head><meta name='viewport' content='width=device-width;'><style type='text/css'>html,body {margin: 0;padding: 0;width: 100%;height: 100%;}html {display: table;}body {display: table-cell;vertical-align: middle;padding: 20px;text-align: …
Run Code Online (Sandbox Code Playgroud) performance objective-c uiwebview uinavigationcontroller ios