Regular iPhone-App Reuse Screen

I am writing code that will allow my iphone-app to have a “configuration page”.

Grouped, scrolling, UITableView ... with cells that contain the necessary text fields, radio buttons, sliders, etc.

This is an ENERGY amount of code. Is there an easier way?

Is there a way to create a simple text file, contain all my desired design options and create my (reusable) code for TableView for me?

Or ... can I just make it simpler and faster in the Builder interface instead of code?

+4
source share
4 answers

Basically, there are two approaches:

  • you rely on what Apple gives you and implements Bundle settings (basically a dictionary that describes what the settings screen should look like), and then your settings will be in the iPhone’s Settings app.

    The disadvantage here is that what the apple provides is quite limited, and you cannot implement some of the most complex settings that you can see in the standard settings of the Apple application.

    That's why many developers are switching to inapp settings thanks to the open source open source FWK, or they are fully implementing everything from scratch, but, as you said, it can be a lot of code.

You redefine your own UIViewController for settings or rely on some framework that the UIViewController will provide you with to expand and facilitate your implementation. There are 2 good frameworks for this (Jesse brought one of them, but there is one more)
InAppSettings ( http://inscopeapps.com/blog/inappsettings-10/ ) InAppSettingsKit ( http://inappsettingskit.com/ )

A comparison of the two frameworks can be found here: http://inscopeapps.com/blog/inappsettings-vs-inappsettingskit/ (it’s good that from one of the two authors, but at least it gives an idea;)

+5
source

If you can live with the limitations of the standard application settings on the iPhone, you can create it using a set of parameters that only needs a plist and possibly a localized string file.

You can check the Apple documentation for this: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationSettings/ApplicationSettings.html

Klaus

+2
source

If you are looking for a turnkey and reusable solution, you can check out http://www.inappsettingskit.com/

It is also open source, so it is useful as a base.

I have never found a simple and effective way to create a complex table view using Interface Builder, so I think programming settings view is preferable.

If you're talking about using a text file or plist, you might want to mimic the Settings Bundle Settings construct.

Download the plist data at application startup.

+1
source

I built something like what you are looking for. Starting from Klaus’s response, he simply duplicates the interface of the Settings application using the same settings.plist file as the settings application. The only difference is that it is a view controller that can be placed inside the application. There was an amazingly small amount of coding, it was just easy to see the settings application to see exactly how things were stated.

0
source

Source: https://habr.com/ru/post/1304075/


All Articles