简体   繁体   English

如何在iPhone应用程序捆绑包中显示GPL许可证

[英]How to Show a GPL licence in iphone application bundle

i am making an app for iphone and for that i am using certain free libraries.My problem is that i want to show their complete license of nearly 4-5 pages in my application bundle so that a user can open settings in iphone and see that licensing page at one time but i am unable to do it.I have read these Specifiers for making an application bundle . 我正在为iphone制作一个应用程序,为此,我正在使用某些免费库。我的问题是我想在我的应用程序包中显示将近4-5页的完整许可证,以便用户可以在iphone中打开设置并看到一次获得许可页面,但我无法完成它。

PSGroupSpecifier PSGroupSpecifier

PSTitleValueSpecifier PSTitleValueSpecifier

PSTextFieldSpecifier PSTextFieldSpecifier

PSSliderSpecifier PSSliderSpecifier

PSToggleSwitchSpecifier PSToggleSwitchSpecifier

PSMultiValueSpecifier PSMultiValueSpecifier

PSChildPaneSpecifier PSChildPaneSpecifier

but i want to show a page full of text like Settings->General->About->Leagl just like in iphone through PSChildPaneSpecifier .Please help me how to do this>??? 但是我想显示一个充满文本的页面,如设置->常规->关于->引导,就像通过PSChildPaneSpecifier在iPhone中一样。请帮助我如何执行此操作> ???

Thanks 谢谢

You can create the same effect as used by Apple's iWorks apps for the license > section of the settings, without using any custom preference controller. 您可以为设置的“许可”>“部分”创建与Apple iWorks应用程序相同的效果,而无需使用任何自定义首选项控制器。 Note this works for iOS 5 on the iPad, I have not tried it elsewhere. 请注意,此功能适用于iPad上的iOS 5,我没有在其他地方尝试过。 Use a PSChildPaneSpecifier for the initial control in the root plist. 将PSChildPaneSpecifier用于根plist中的初始控件。 This points to the name of another plist file which will be the displayed child pane. 这指向另一个plist文件的名称,它将是显示的子窗格。 You do not add .plist to the name within the root.plist file, it is implied. 您不会在root.plist文件中的名称中添加.plist,这是隐含的。 This plist file must be within the settings bundle. 此plist文件必须在设置包中。 Next, use PSGroupSpecifiers in the child pane as the controls. 接下来,使用子窗格中的PSGroupSpecifiers作为控件。 For each paragraph use another PSGroupSpecifier - so the thing will scroll. 对于每个段落,请使用另一个PSGroupSpecifier-这样事情就会滚动。 Only use the Title section of the PSGroupSpecifier. 仅使用PSGroupSpecifier的“标题”部分。 The next gotcha that I found, was that by putting the strings in the plist file, the text was clipped in portrait orientation, so a placeholder string needs to go in the plist file and a StringTable used to point to a strings file. 我发现的下一个难题是,通过将字符串放入plist文件中,文本被纵向剪切,因此,占位符字符串需要放入plist文件中,而StringTable则用于指向字符串文件。 Text read from the strings file is properly kerned and displays without clipping. 从字符串文件读取的文本已正确调整字距,并且显示时不会剪切。

The iPhone's "Legal" page is a custom preference controller which you can't use (not even with undocumented methods – you need to write a preference bundle in system locations which AppStore apps can't reach at all). iPhone的“法律”页面是一个您无法使用的自定义首选项控制器(即使使用未记录的方法也不能使用–您需要在AppStore应用程序根本无法到达的系统位置编写首选项包)。

If you'd like to display the license, show it in the app. 如果您想显示许可证,请在应用程序中显示它。

I think you are going to need to use something like a UITextView, just make it non-editable. 我认为您将需要使用UITextView之类的东西,只是使其不可编辑。 You can make in unobtrusive in your app but I think that is the only way to have 4-5 pages. 您可以在您的应用程序中加入一些标签,但我认为这是拥有4-5页的唯一方法。

I don't think there is a nice way of displaying this in the preferences bundle. 我认为在首选项包中没有一种显示此内容的好方法。 Personally I would either provide a series of url links or bring the preferences into the app itself. 就个人而言,我要么提供一系列URL链接,要么将首选项引入应用程序本身。 There is a good framework on github here that you may be able to modify. 有在github一个很好的框架, 在这里 ,你或许可以修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM