首页 \ 问答 \ 在Swift中的Framework中导入Facebook SDK(Import Facebook SDK inside Framework in Swift)

在Swift中的Framework中导入Facebook SDK(Import Facebook SDK inside Framework in Swift)

我正在开发一个Swift框架,需要在其中实现Facebook登录。 但是,当我尝试将FacebookSDK包含在伞形标题中时,我得到以下结果:

include of non-modular header inside framework module <MyModule>

我查看了Xcode 6 / Beta 4:不支持使用带有框架目标的桥接头

但我无法按照答案中的建议将框架标题添加到我的公共标题中。 有没有人设法解决这个问题,或者知道如何将框架导入框架?


I'm developing a Swift framework and need to implement Facebook login in it. However when I try to include the FacebookSDK into the umbrella header I get the following:

include of non-modular header inside framework module <MyModule>

I have looked at Xcode 6 / Beta 4: using bridging headers with framework targets is unsupported

But I can't add the framework headers to my public headers as suggested in the answer. Has anyone managed to solve this, or know how to import a Framework into a Framework?


原文:https://stackoverflow.com/questions/26110600
更新时间:2023-09-05 18:09

最满意答案

你可以通过多种方式做到这一点,这是最常见的两种方式。

方法1

为要打印的每个页面创建用户控件在用户打印页面的页面中添加这些用户控件。将每个用户控件放在单独的div中并放在主容器中,并在打印时获取容器div的css,其中包括所有数据。

方法2

在主容器的新窗口中为每个页面创建div。在页面加载时以div为单位加载数据,当用户按下Print时,获取容器div的所有html并打印出来。


You can do this in many ways here are two most common.

Method 1

Create user control for each page which you want to be printed add these user controls in the page where user will print the page.Load each user control in separate div and place in main container and at print time get css of container div which will include all data.

Method 2

Create div for each page which you were opening in new window in a main container .Load data in divs at page load and when user press Print get all html of container div and print it.

相关问答

更多
  • 克隆窗口时,它是Visual Studio的命名约定。 但是,有时候,Visual Studio会让人感到困惑并以这种方式命名。 It's the naming convention for Visual Studio when the window is cloned. Sometimes, however, Visual Studio just gets confused and names it that way.
  • 你可以通过多种方式做到这一点,这是最常见的两种方式。 方法1 为要打印的每个页面创建用户控件在用户打印页面的页面中添加这些用户控件。将每个用户控件放在单独的div中并放在主容器中,并在打印时获取容器div的css,其中包括所有数据。 方法2 在主容器的新窗口中为每个页面创建div。在页面加载时以div为单位加载数据,当用户按下Print时,获取容器div的所有html并打印出来。 You can do this in many ways here are two most common. Method 1 ...
  • 在构建CHM帮助文件时,最好将主题分成较小的单元和单独的HTML文件。 这样,更容易分配到目录(TOC)。 然后搜索结果很清楚,我推荐这种方法。 当然,您可以从TOC跳转到锚标记(见下文)。 执行搜索时,结果列表是一组项目,其中标题从每个文档标记中解除。 据我测试,您无法更改搜索结果列表中的标题。 我记得如果启用了二进制TOC,可能会看到似乎与相关主题不对应的标题。 对于二进制TOC,会发生什么,从TOC项标签而不是文档<title>标签中取出主题标题。 我怀疑这是一个HH 1.x集合功能。 ... </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/dispformaspxxbqyzdklj_269" target="_blank">dispform.aspx在新标签页中打开链接(dispform.aspx open link in new tab)</a><i>[2022-05-31] </i></h2> </div> <div class="tw_li_cont"> 检查链接上附带的任何JavaScript,并查看删除它。 <a rel="sp_DialogLinkNavigate" href="xxxx/xxxx/xxx.docx" onmousedown="return VerifyHref(this, event, '1', 'SharePoint.OpenDocuments.3', '')" onclick="DispDocItemExWithServerRedirect(this, event, 'FALSE', 'FALSE', 'FALSE', 'Shar ... </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/aspxwenjianzhongtiaoguopiehao_402" target="_blank">在aspx文件中跳过撇号(Escape apostrophe in aspx file)</a><i>[2023-04-25] </i></h2> </div> <div class="tw_li_cont"> <asp:Button ID="btnClone" runat="server" OnClick="btnClone_Click" OnClientClick="confirm('How do you escape this apos\'trophe?')" /> <asp:Button ID="btnClone" runat="server" OnClick="btnClone_Click" OnClientClick="confirm('How do you escape this ap ... </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/sharepointwspbuilderdgaspxym_421" target="_blank">sharepoint wspbuilder单个aspx页面(sharepoint wspbuilder single aspx page)</a><i>[2023-09-27] </i></h2> </div> <div class="tw_li_cont"> 以下博客可以帮助您 http://www.allaboutmoss.com/index.php/2010/03/05/how-to-create-wsp-package-for-user-controls/ The below blog may helps you http://www.allaboutmoss.com/index.php/2010/03/05/how-to-create-wsp-package-for-user-controls/ </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/dgaspxcstjlgaspxym_431" target="_blank">为单个aspx.cs添加两个aspx页面(Add two aspx pages for single aspx.cs)</a><i>[2022-07-28] </i></h2> </div> <div class="tw_li_cont"> 微软并不真正支持 我和微软讨论了这个问题,这是我从他们那里得到的。 经过进一步调查,结果如下。 由于Intellisense的工作方式,我们无法支持涉及aspx.cs文件后面的共享代码的方案的Intellisense。 可以采用两种不同的方法来处理这种情况。 VS中支持的选项是使用AppCode或UserControll作为公共代码元素,然后调用这些方法来实现公共代码库。 第二个选项涉及以您当前正在使用它的方式(不使用Intellisense)来使用CodeBehind,并假定代码对于这两个设计页都是正确的 ... </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/changliangaspx_452" target="_blank">常量和aspx(Constants and aspx)</a><i>[2022-04-17] </i></h2> </div> <div class="tw_li_cont"> 在web.config上添加类的命名空间,以便它可以识别它... Add the namespace of class on the web.config so it can recognize it ... probably </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/tgfbwzggdgaspxym_545" target="_blank">如何从托管发布的网站更改单个aspx页面?(How can I change a single aspx page from hosted published website?)</a><i>[2023-06-19] </i></h2> </div> <div class="tw_li_cont"> 您正在搜索IIS asp.net应用程序的无缝部署策略; 这可以通过两台机器和一台负载均衡器实现 - 在ASP.NET中无缝部署(IIS在新工作进程准备好之前杀死工作进程) 另一种令人费解的方式是在同一主机上托管两个相同的网站并在它们之间切换,正如所解释的那样 - 使用组件化的ASP.NET MVC应用程序可以顺利部署吗? You are searching for strategies of seamless deployment for IIS asp.net apps; this can be ach ... </div> </div> </li> <li class="tw_li clearfix"> <div class="tw_li_con"> <div class="tw_li_title"> <h2><a href="/wenda/sharepoint2010zdgnmfwaspx_545" target="_blank">Sharepoint 2010中单个匿名访问aspx的问题(Problems with single anonymous access aspx in Sharepoint 2010)</a><i>[2023-06-08] </i></h2> </div> <div class="tw_li_cont"> 必须满足两个要求: 页面需要从UnsecuredLayoutsPageBase类继承, 需要重写属性AllowAnonymousAccess才能返回true 。 Two requirements must be met: the page needs to inherit from the class UnsecuredLayoutsPageBase, the property AllowAnonymousAccess needs to be overridden to return true. </div> </div> </li> </ul> </div> <div class="main_right"> <div class="search-out"> <div class="search"> <form action="/wenda" target="_blank" method="get"> <input type="search" autocorrect="off" autocomplete="off" placeholder="请输入关键词" id="q" name="q" value=""> <button class="btn_s" type="submit">搜索</button> </form> </div> </div> <div class="commonh"> <h2>相关文章</h2> <span class="fr"><a href="/jiaocheng" target="_blank">更多</a></span> </div> <div class="right_list"> <li> <a title="inside MPQ" href="/article/insideMPQ_3" target="_blank">inside MPQ</a> </li> <li> <a title="FaceBook实时Hadoop" href="/article/FaceBookshishiHadoop_0" target="_blank">FaceBook实时Hadoop</a> </li> <li> <a title="Using Lucene's new QueryParser framework in Solr" href="/article/UsingLucenesnewQueryParserframeworkinSolr_2" target="_blank">Using Lucene's new QueryParser framework in Solr</a> </li> <li> <a title="Facebook的Realtime Hadoop及其应用" href="/article/FacebookdRealtimeHadoopjqyy_0" target="_blank">Facebook的Realtime Hadoop及其应用</a> </li> <li> <a title="[转贴]超级懒汉编写的基于.NET的微信SDK" href="/article/ztcjlhbxdjyNETdwxSDK_3" target="_blank">[转贴]超级懒汉编写的基于.NET的微信SDK</a> </li> <li> <a title="超级懒汉编写的基于.NET的微信SDK" href="/article/cjlhbxdjyNETdwxSDK_3" target="_blank">超级懒汉编写的基于.NET的微信SDK</a> </li> <li> <a title="【z】Storm - the world's best IDE framework for .NET" href="/article/zStormtheworldsbestIDEframeworkforNET_3" target="_blank">【z】Storm - the world's best IDE framework for .NET</a> </li> <li> <a title="qq微信c#sdk" href="/article/qqweixincsdk_2" target="_blank">qq微信c#sdk</a> </li> <li> <a title="IOS-Social.framework" href="/article/IOSSocialframework_3" target="_blank">IOS-Social.framework</a> </li> <li> <a title="在Eclipse中查看SDK源代码的方法" href="/article/zEclipsezckSDKydmdff_5" target="_blank">在Eclipse中查看SDK源代码的方法</a> </li> </div> <div class="commonh"> <h2>最新问答</h2> <span class="fr"><a href="/wenda" target="_blank">更多</a></span> </div> <div class="right_list"> <li> <a title="您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)" href="/wenda/gitdiffwjbjyyyyckfbfz_166" target="_blank">您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)</a> </li> <li> <a title="将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)" href="/wenda/zfdzjqxsdfzdzfsz_208" target="_blank">将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)</a> </li> <li> <a title="OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)" href="/wenda/octobercmscebianlanchengxian_358" target="_blank">OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)</a> </li> <li> <a title="页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)" href="/wenda/ymjzdxzgljhs_380" target="_blank">页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)</a> </li> <li> <a title="codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)" href="/wenda/codeigniterzyybnayqgz_201" target="_blank">codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)</a> </li> <li> <a title="在计算机拍照在哪里进入" href="/wenda/jisuanjipaizhaozaina_8" target="_blank">在计算机拍照在哪里进入</a> </li> <li> <a title="使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)" href="/wenda/cingetczsrlzdqbxyzfdiscardunwant_470" target="_blank">使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)</a> </li> <li> <a title="No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)" href="/wenda/forxhjzforxhyx_517" target="_blank">No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)</a> </li> <li> <a title="单页应用程序:页面重新加载(Single Page Application: page reload)" href="/wenda/danyeyingyongchengxuyemianjiazai_103" target="_blank">单页应用程序:页面重新加载(Single Page Application: page reload)</a> </li> <li> <a title="在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)" href="/wenda/xunhuanzhongxuanmoshilieming_433" target="_blank">在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)</a> </li> <li> <a title="System.StackOverflow错误(System.StackOverflow error)" href="/wenda/systemstackoverflowcuowu_431" target="_blank">System.StackOverflow错误(System.StackOverflow error)</a> </li> <li> <a title="KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)" href="/wenda/knockoutjswzqtmbbeforeremoveafte_429" target="_blank">KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)</a> </li> <li> <a title="散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)" href="/wenda/sanliebaokuofangfaqiantaoshuxing_254" target="_blank">散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)</a> </li> <li> <a title="android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)" href="/wenda/androidsamsungrfswjxtycdj_556" target="_blank">android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)</a> </li> <li> <a title="TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)" href="/wenda/tensorflowsylbcjxz_538" target="_blank">TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)</a> </li> <li> <a title="企业安全培训的各项内容" href="/wenda/qiyeanquanpeixungexiangneirong_20" target="_blank">企业安全培训的各项内容</a> </li> <li> <a title="错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)" href="/wenda/cuowurpcshibai_88" target="_blank">错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)</a> </li> <li> <a title="C#类名中允许哪些字符?(What characters are allowed in C# class name?)" href="/wenda/cleimingzhongyunzifu_157" target="_blank">C#类名中允许哪些字符?(What characters are allowed in C# class name?)</a> </li> <li> <a title="NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)" href="/wenda/numpyint64zccnparrayzdtypefloat6_310" target="_blank">NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)</a> </li> <li> <a title="注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)" href="/wenda/zhuxiaoyinzangdaohangportlet_526" target="_blank">注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)</a> </li> <li> <a title="将多个行和可变行移动到列(moving multiple and variable rows to columns)" href="/wenda/duogexingkebianxingdongdaolie_442" target="_blank">将多个行和可变行移动到列(moving multiple and variable rows to columns)</a> </li> <li> <a title="提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)" href="/wenda/tjbdshljchrefbsjavascript_382" target="_blank">提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)</a> </li> <li> <a title="对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)" href="/wenda/setoninfowindowclicklisteneryitu_249" target="_blank">对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)</a> </li> <li> <a title="Angular $资源不会改变方法(Angular $resource doesn't change method)" href="/wenda/angularziyuanhuigaifangfa_275" target="_blank">Angular $资源不会改变方法(Angular $resource doesn't change method)</a> </li> <li> <a title="在Angular 5中不是一个函数(is not a function in Angular 5)" href="/wenda/angularzhonghanshu_308" target="_blank">在Angular 5中不是一个函数(is not a function in Angular 5)</a> </li> <li> <a title="如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)" href="/wenda/pzcompositec1mzmyzdtgfw_354" target="_blank">如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)</a> </li> <li> <a title="不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])" href="/wenda/bsxtxtsysfz_203" target="_blank">不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])</a> </li> <li> <a title="常见的python rpc和cli接口(Common python rpc and cli interface)" href="/wenda/changjianpythonrpcclijiekou_315" target="_blank">常见的python rpc和cli接口(Common python rpc and cli interface)</a> </li> <li> <a title="Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)" href="/wenda/mysqldbdgzdppdgzd_259" target="_blank">Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)</a> </li> <li> <a title="产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)" href="/wenda/chanpinyemianmagentochushouduiqi_417" target="_blank">产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)</a> </li> </div> </div> </div> </div> <div style="clear:both;"></div> <div class="footer"> <div class="mainbox"> <div class="info"> <p>Copyright ©2023 <a href="https://www.peixunduo.com" target="_blank">peixunduo.com</a> All Rights Reserved.<a href="https://beian.miit.gov.cn/" target="_blank">粤ICP备14003112号</a> </p> <p>本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!</p> </div> </div> </div> <script type="text/javascript" src="/resources/js/common.js?v=324"></script> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https'){ bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else{ bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?9eebaceb5e4371a0aad59712a1a1ecff"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </body> </html>