InAppSettingsKit
================
InAppSettingsKit is an open source solution to to easily add in-app settings to your iPhone apps. It uses a hybrid approach by maintaining the Settings.app pane. So the user has the choice where to change the settings. More details about the history of this development on the [FutureTap Blog](http://www.futuretap.com/blog/inappsettingskit) and the [Edovia Blog](http://www.edovia.com/blog/inappsettingskit).
How does it work?
=================
To support traditional Settings.app panes, the app must include a `Settings.bundle` with at least a `Root.plist` to specify the connection of settings UI elements with `NSUserDefaults` keys. InAppSettingsKit basically just uses the same Settings.bundle to do its work. This means there's no additional work when you want to include a new settings parameter. It just has to be added to the Settings.bundle and it will appear both in-app and in Settings.app. All settings types like text fields, sliders, toggle elements, child views etc. are supported.
The License
===========
We released the code under the liberal BSD license in order to make it possible to include it in every project, be it a free or paid app. The only thing we ask for is giving the [original developers](http://www.inappsettingskit.com/about) some credit. The easiest way to include credits is by leaving the "Powered by InAppSettingsKit" notice in the code. If you decide to remove this notice, a noticeable mention on the App Store description page or homepage is fine, too. To gain some exposure for your app we suggest [adding your app](http://www.inappsettingskit.com/apps) to our list.
How to include it?
==================
The source code is available on [github](http://github.com/futuretap/InAppSettingsKit). Usually, you copy the `InAppSettingsKit` subfolder into your project. Then you can display the InAppSettingsKit view controller using a navigation push, as a modal view controller or in a separate tab of a TabBar based application. The sample app demonstrates all three ways to integrate InAppSettingsKit.
Depending on your project it might be needed to make some changes in the startup code of your app. Your app has to be able to reconfigure itself at runtime if the settings are changed by the user. This could be done in a `-reconfigure` method that is being called from `-applicationDidFinishLaunching` as well as in the delegate method `-settingsViewControllerDidEnd:` of `IASKSettingsViewController`.
Goodies
=======
The intention of InAppSettingsKit was to create a 100% imitation of the Settings.app behavior. However, we added some bonus features for extra flexibility.
Custom inApp plists
---------------------------
Since iOS 4 Settings plists can be device-dependent: `Root~ipad.plist` will be used on iPad and `Root~iphone.plist` on iPhone. If not existent, `Root.plist` will be used. InAppSettingsKit adds the possibility to override those standard files by using `.inApp.plist` instead of `.plist`. Alternatively, you can create a totally separate bundle named `InAppSettings.bundle` instead of the usual `Settings.bundle`. The latter approach is useful if you want to suppress the settings in Settings.app.
In summary, the plists are searched in this order:
- InAppSettings.bundle/FILE~DEVICE.inApp.plist
- InAppSettings.bundle/FILE.inApp.plist
- InAppSettings.bundle/FILE~DEVICE.plist
- InAppSettings.bundle/FILE.plist
- Settings.bundle/FILE~DEVICE.inApp.plist
- Settings.bundle/FILE.inApp.plist
- Settings.bundle/FILE~DEVICE.plist
- Settings.bundle/FILE.plist
Different in-app settings are useful in a variety of situations. For example, [Where To?](http://www.futuretap.com/whereto) uses this mechanism to change the wording of "At next start" (for resetting confirmation dialogs) to be appropriate if the app is already running.
Variable font size
------------------
The labels in the settings table are displayed in a variable font size, especially handy to squeeze-in long localizations (beware: this might break the look in Settings.app if labels are too long!).
IASKOpenURLSpecifier
--------------------
InAppSettingsKit adds a new element that allows to open a specified URL using an external application (i.e. Safari or Mail). See the sample `Root.inApp.plist` for details.
IASKMailComposeSpecifier
------------------------
The custom `IASKMailComposeSpecifier` element allows to send mail from within the app by opening a mail compose view. You can set the following (optional) parameters using the settings plist: `IASKMailComposeToRecipents`, `IASKMailComposeCcRecipents`, `IASKMailComposeBccRecipents`, `IASKMailComposeSubject`, `IASKMailComposeBody`, `IASKMailComposeBodyIsHTML`. Optionally, you can implement
- (NSString*)settingsViewController:(id<IASKViewController>)settingsViewController mailComposeBodyForSpecifier:(IASKSpecifier*)specifier;
in your delegate to pre-fill the body with dynamic content (great to add device-specific data in support mails for example). An alert is displayed if Email is not configured on the device.
IASKButtonSpecifier
-------------------
InAppSettingsKit adds a `IASKButtonSpecifier` element that allows to call a custom action. Just add the following delegate method:
- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForKey:(NSString*)key:
The sender is always an instance of `IASKAppSettingsViewController`, a `UIViewController` subclass. So you can access its view property (might be handy to display an action sheet) or push another view controller. The key corresponds to the `Key` attribute in the Settings plist (useful if you wanna call the same method for different keys). Another nifty feature is that the title of IASK buttons can be overriden by the (localizable) value from `NSUserDefaults` (or any other settings store - see below). This comes in handy for toggle buttons (e.g. Login/Logout). See the sample app for details.
FooterText
----------
The FooterText key for Group elements is available in system settings since iOS 4. It is supported in InAppSettingsKit as well. On top of that, we support this key for Multi Value elements as well. The footer text is displayed below the table of multi value options.
IASKCustomViewSpecifier
-----------------------
You can specify your own `UITableViewCell` within InAppSettingsKit by using the type `IASKCustomViewSpecifier`. A mandatory field in this case is the `Key` attribute. Also, you have to support the `IASKSettingsDelegate` protocol and implement these methods:
- (CGFloat)tableView:(UITableView*)tableView heightForSpecifier:(IASKSpecifier*)specifier;
- (UITableViewCell*)tableView:(UITableView*)tableView cellForSpecifier:(IASKSpecifier*)specifier;
Both methods are called for all your `IASKCustomViewSpecifier` entries. To differentiate them, you can access the `Key` attribute using `specifier.key`. In the first method you return the height of the cell, in the second method the cell itself. You should use reusable `UITableViewCell` objects as usual in table view programming. There's an example in the Demo app.
Optionally you can implement
- (void)settingsViewController:(IASKAppSettingsViewController*)sender tableView:(UITableView *)tableView didSelectCustomViewSpecifier:(IASKSpecifier*)specifier;
to catch tap events for your custom view.
Custom Group Header Views
-------------------------
You can define custom headers for `PSGroupSpecifier` segments by adding a `Key` attribute and implementing these methods in your `IASKSettingsDelegate`:
- (CGFloat)settingsViewController:(id<IASKViewController>)settingsViewController tableView:(UITableView*)tableView heightForHeaderForSection:(NSInteger)section;
- (UIView*)settingsViewController:(id<IASKViewController>)settingsViewController tableView:(UITableView *)tableView viewForHeaderForSection:(NSString*)key;
The behaviour is similar to the custom cells except that the methods get the key directly as a string, not
没有合适的资源?快使用搜索试试~ 我知道了~
iOS游戏应用源代码——futuretap-InAppSettingsKit-76f0b5a.zip
共79个文件
h:20个
m:20个
xib:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 2 浏览量
2023-07-02
16:48:21
上传
评论
收藏 129KB ZIP 举报
温馨提示
iOS游戏应用源代码——futuretap-InAppSettingsKit-76f0b5a.zip
资源推荐
资源详情
资源评论
收起资源包目录
iOS游戏应用源代码——futuretap-InAppSettingsKit-76f0b5a.zip (79个子文件)
futuretap-InAppSettingsKit-76f0b5a
LICENSE 678B
.gitignore 193B
InAppSettingsKit
Views
IASKSlider.m 800B
IASKTextField.h 787B
IASKPSSliderSpecifierViewCell.h 1KB
IASKPSTitleValueSpecifierViewCell.m 2KB
IASKTextField.m 809B
IASKSlider.h 778B
IASKPSToggleSwitchSpecifierViewCell.m 2KB
IASKPSTextFieldSpecifierViewCell.m 2KB
IASKSwitch.h 778B
IASKSwitch.m 801B
IASKPSTextFieldSpecifierViewCell.h 958B
IASKPSToggleSwitchSpecifierViewCell.h 949B
IASKPSSliderSpecifierViewCell.m 2KB
IASKPSTitleValueSpecifierViewCell.h 761B
Xibs
IASKPSToggleSwitchSpecifierViewCell.xib 10KB
IASKAppSettingsView.xib 11KB
IASKAppSettingsWebView.xib 17KB
IASKPSTextFieldSpecifierViewCell.xib 11KB
IASKPSSliderSpecifierViewCell.xib 11KB
IASKSpecifierValuesView.xib 11KB
Controllers
IASKSpecifierValuesViewController.m 6KB
IASKAppSettingsWebViewController.m 5KB
IASKViewController.h 947B
IASKAppSettingsViewController.m 33KB
IASKAppSettingsWebViewController.h 1KB
IASKAppSettingsViewController.h 3KB
IASKSpecifierValuesViewController.h 1KB
Models
IASKSettingsStoreFile.m 1KB
IASKSpecifier.m 7KB
IASKSettingsReader.m 9KB
IASKSettingsReader.h 6KB
IASKSpecifier.h 2KB
IASKSettingsStore.m 2KB
IASKSettingsStore.h 1KB
IASKSettingsStoreUserDefaults.h 873B
IASKSettingsStoreFile.h 952B
IASKSettingsStoreUserDefaults.m 2KB
README.md 10KB
InAppSettingsKitSampleApp
InAppSettingsKitSampleApp.xcodeproj
project.pbxproj 35KB
English.lproj
Localizable.strings 743B
settings_about.html 846B
MainWindow.xib 31KB
CustomViewCell.xib 17KB
CustomViewCell.h 318B
Icon.png 888B
German.lproj
Localizable.strings 748B
settings_about.html 900B
MainWindow.xib 31KB
main.m 896B
French.lproj
Localizable.strings 746B
MainWindow.xib 36KB
InAppSettingsKitSampleApp_Prefix.pch 979B
CustomSubviewController.xib 18KB
InAppSettingsKitSampleApp-Info.plist 976B
Classes
InAppSettingsKitSampleAppAppDelegate.m 1KB
InAppSettingsKitSampleAppAppDelegate.h 1KB
MainViewController.h 1KB
MainViewController.m 7KB
CustomViewCell.m 724B
CustomSubviewController.m 2KB
CustomSubviewController.h 782B
20-gear2.png 375B
iPad
English.lproj
MainWindow-iPad.xib 28KB
German.lproj
MainWindow-iPad.xib 28KB
French.lproj
MainWindow-iPad.xib 28KB
Settings.bundle
Root~iphone.inApp.plist 7KB
Root~ipad.inApp.plist 7KB
Complete.plist 12KB
fast.png 965B
Root.inApp.plist 7KB
Root.plist 4KB
slow.png 780B
de.lproj
Root.strings 2KB
Advanced.plist 2KB
Root~ipad.plist 4KB
en.lproj
Root.strings 4KB
Root~iphone.plist 4KB
共 79 条
- 1
资源评论
快乐无限出发
- 粉丝: 1135
- 资源: 7274
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 简单的Linux C代码,实现链表功能
- 汇编语言探索之旅:从基础到实践,解锁底层奥秘-markdown材料.zip
- Fortran语言:经典与现代交织的编程之旅-markdown材料.zip
- 基于python编写的appium自动化框架,采用PO模式,并集成了日志以及测试报告通过邮件发送的功能
- csdn.apk
- spleeter模型下载
- 微信小程序 - 图书管理系统源码.zip
- 微信小程序 - 图片自适应 ,富文本解析源码.zip
- 微信小程序 - 同乐居商城:购物车合算源码
- 1、根据输入的三条边值判断能组成何种三角形,并设计测试数据进行判定覆盖测试 三条边为变量a、b、c,范围为1≤边值≤10,不在范
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功