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项目源代码 各种布局控件使用及扩展视图自定义UITableViewCell等源码合集.rar
共1891个文件
png:402个
m:317个
h:303个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 198 浏览量
2022-12-30
16:56:37
上传
评论
收藏 12.54MB RAR 举报
温馨提示
ios项目源代码 各种布局控件使用及扩展视图自定义UITableViewCell等源码合集: DTCoreText-1.6.10在UITextView上实现十分丰富的文字效果 ios三级展开列表TQMultistageTableView_10802 ios个性化每个tableMHNibTableViewCell ios分页的滚动视图 IOS可扩展底部TablBar ios底部菜单 IOS欢迎界面 IOS网易新闻下拉刷新demo_10802 ios适用于iOS 5、iOS 6和iOS 7的自定义NavigationBar UICoreTextView-CoreText文字渲染 列表个性化列表项 利用 Core Text 实现代码根据语法高亮显示效果 利用CoreText展示连接、电话、邮箱 后台获取功能 导航及底部菜单 自定义Tab Bar的文字、颜色和图片加箭头 自定义UITableViewCell。实现各种样式的表格输入界面 高仿新百度贴吧列表效果_10802
资源推荐
资源详情
资源评论
收起资源包目录
ios项目源代码 各种布局控件使用及扩展视图自定义UITableViewCell等源码合集.rar (1891个子文件)
14349a20cf42ccb2e88552b8bc040ca82b7be7 2KB
157b0cdee13a75bde1e1c076039224b5f6e786 2KB
1b11eaf3f93a4162751035167177dec04579ef 179B
1c5cf99b62b59f676fbae9c7eb0388b407b0f6 105B
33404000b6c5982b70f17da365a1a4039eef7d 19KB
33e5e237627bd893be8c5e764dbd392c8d10e8 2KB
3a11cb7bd601e070c0d0a16999c2d41d46854b 2KB
3cbb9aad34d41326ebb328f26ff8eff927d734 167B
431b4442aaf4dcff3f765741400cd93f6434c4 3KB
434046d9e1fad8336b1fc053128633fab6523e 3KB
43a2795453aff1b62b6ffc28da0013ad24f00e 58B
4c42ef47d2679d8fe5687f74ab192a264f9118 4KB
546bff4ea2cebf5f7c0b622316f0ae8fc92bc2 2KB
54cd53ce5b6034d7778b74427bf5ebea46971d 4KB
565120a193cd06d6ca6998876eb26ee9bb9031 426B
5674375ee618460370a368fc4838d23bcdbdb0 270B
576ed5b0107ad0bba1779db58167e2d3ba2472 323B
5be2c38b97d87f0c402bc685643d2ab50287f3 3KB
5f3266b51c5d81e612a00c1285384407eccbc0 14KB
5fc3ec22ae8e90fa8a092d9797f25deae11015 388B
602cf36fc1a9e23f19cdf2273e94d6b8cafd89 3KB
64a0d5c5e506014ccd3839e35746c5e88a041d 483B
65973760235ce4eddd0930f90e1d217e9a86d1 4KB
6610e741cf897b50ae2213929828ef241bbae4 2KB
7a0da85dfebf0e30a739bbfef03c5f7f9c1fff 1KB
7a3202b408787d14ab0091b5c791f1384c2a5f 386B
7b28ff8f86a3158a71c4934fbd3a2456717d7a 61B
7b28ff8f86a3158a71c4934fbd3a2456717d7a 61B
809a4bed0ed9ed266a1613fffb0bf4927a6eec 2KB
85025a480ed36bdeaec1067e84970cb95fd01a 252B
86eb73cecfe1fdbb6c3c4b5b1470519db20557 2KB
8768d4a8c099f5bf09b871d6528c15c710f3f1 2KB
87cd437ad0e262e4d48b37392fe2377292debc 3KB
896ced88a063352b6663a296f69521d2af02f3 2KB
8b3433bc922ae8f05cb58f4eba608980e17487 1KB
8c22958c4efaee752c317ec3a74829e30e52fd 2KB
8ca6f693f96d511e9113c0eb59eec552354e42 2KB
8ca6f693f96d511e9113c0eb59eec552354e42 2KB
8ef9e076a476cc4236d86fc2a2e0899a6d0eb9 183B
8f36b2bcbfd6edfdfb681d142e09453d590230 175B
91b7aabfcf3422423b109c8beed2bab838c607 2KB
91b7aabfcf3422423b109c8beed2bab838c607 2KB
9852bdde2b0ffa8445d12d3e124b955cf7d1a1 2KB
9a3c9c132ab5c994967ad5fa6a3fceab9ca727 125B
9b5cdd4747e94e21dfe2df442a83a5df1e48f3 232B
9bfa7f685151efbda0f4a07a32867f23d980be 15KB
9f38223bca84f3e3ef369b2468c5bce201f106 319B
9f5b6e11db4f59687d7a3100940c022e015304 58B
._03 212B
._08 212B
._09 212B
._11 212B
._157b0cdee13a75bde1e1c076039224b5f6e786 212B
._17 212B
._1a 212B
._23 212B
._27 212B
._2f 212B
._33 212B
._33404000b6c5982b70f17da365a1a4039eef7d 212B
._33e5e237627bd893be8c5e764dbd392c8d10e8 212B
._34 212B
._35 212B
._39 212B
._3a11cb7bd601e070c0d0a16999c2d41d46854b 212B
._3b 212B
._3cbb9aad34d41326ebb328f26ff8eff927d734 212B
._3d 212B
._42 212B
._431b4442aaf4dcff3f765741400cd93f6434c4 212B
._434046d9e1fad8336b1fc053128633fab6523e 212B
._43a2795453aff1b62b6ffc28da0013ad24f00e 212B
._45 212B
._47 212B
._4a 212B
._4b 212B
._4c 212B
._4c42ef47d2679d8fe5687f74ab192a264f9118 212B
._54 212B
._546bff4ea2cebf5f7c0b622316f0ae8fc92bc2 212B
._54cd53ce5b6034d7778b74427bf5ebea46971d 212B
._565120a193cd06d6ca6998876eb26ee9bb9031 212B
._5674375ee618460370a368fc4838d23bcdbdb0 212B
._576ed5b0107ad0bba1779db58167e2d3ba2472 212B
._5be2c38b97d87f0c402bc685643d2ab50287f3 212B
._5c 212B
._5f3266b51c5d81e612a00c1285384407eccbc0 212B
._60 212B
._602cf36fc1a9e23f19cdf2273e94d6b8cafd89 212B
._63 212B
._64a0d5c5e506014ccd3839e35746c5e88a041d 212B
._65973760235ce4eddd0930f90e1d217e9a86d1 212B
._6610e741cf897b50ae2213929828ef241bbae4 212B
._67 212B
._6a 212B
._74 212B
._7a 212B
._7a3202b408787d14ab0091b5c791f1384c2a5f 212B
._7b28ff8f86a3158a71c4934fbd3a2456717d7a 212B
._7c 212B
共 1891 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
GJZGRB
- 粉丝: 860
- 资源: 5451
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功