How to develop dynamic iOS settings menu - ios

if you are developing Android apps, you can just create a PreferenceScreen/Activity and then link some preference items which are declared in a xml file to that screen. So you can build different settings menus and call them from different places in your app. They all use the same style and the same mechanism to save the settings chosen.
I was just wondering, that there is no such function in iOS. We have to call many different settings menus in our app, so how do I archive this? Is it better to design one dynamic settings screen which you can call from anywhere in your app (filled with different information each time), or should we use one big settings menu where all the app-settings live. Is it possible then, to simply jump to "submenus" of this big settings menu?
Should I use iOS Settings Bundle to generate the menu structure in files and then display them in an tableview?
I could find some Settings-Kits like InAppSettingsKit but I don't like to use an open source library for such an important function.

The settings bundle is the right way to add settings to your app.
It's a bit unusual to access settings from within an iOS app, but if you're sure you want to do so then InAppSettingsKit is a good a way to make the in-app settings as similar to the settings app as possible. The fact that it's open source shouldn't put you off - much of the iOS toolchain is open source.

I did a similar thing where I have an enum of menu modes. Each time the a table view cell is selected it changes the mode and redraws the table view. conditionals in numberOfRowsInSection: and numberOfSections: change the layout of the table and conditionals in cellForRowAtIndexPath: change the content, all based on the new mode set. I then spun the content of the table for each mode out into a JSON file and at the beginning read that into a Dictionary which forms the data structure that the table reads from.
I chose JSON as it's easily parsable with NSJSONSerialization

Related

is it possible to change the LaunchScreen Storyboard according to the country/region or default language of device?

i am developing an iOS app in which i want to show the LaunchScreen/SplashScreen according to the user's desired region or the default language of device amongst the other LaunchScreen stroyboards that i have made, i searched a lot but nothing much helped me so is this possible?
Thanks in advance!!
Who say It's not possible
Select project and add localization as below image
Add any language
Select desired storyboards
And here you can see storyboard for different languages.
---------------------------------- Test your localization --------------------
Edit your target scheme
Change Application language as below images and then run your app
Unfortunately this isn't something you can do.
According to Apple's documentation on Launch Screens, the launch screen should not contain any branding or text, so therefore can't be localised:
Avoid including text on your launch screen. Because launch screens are static, any displayed text won’t be localized.
If you want some localised text, you will have to present a custom view controller as your initial view controller as that will be localisable as any other view controller.
Yes, it is possible. See here
An iOS application should be internationalized and have a
language.lproj folder for each language it supports. In addition to
providing localized versions of your application’s custom resources,
you can also localize your launch images by placing files with the
same name in your language-specific project directories.
It's not possible.But you can mimic this scenario what just ankit said.
Keep the launch screen blank and didFinishLaunchingWithOptions function create a view controller with region specific content.
Below thread might help you.This was basically to add animation and your's quest was region specific but logic is same though. :)
how-to-add-animation-to-launch-screen-in-ios-9-3-using-objective-c

Making Apple style settings view

I want to make settings in my application like Apple Settings. How can I make settings in such style?
In my mind I need TableView + custom Cells with Images & Switches, but it’s very difficult way to go. I think that XCode has easier and more standart way to do that
Update I'm talking about creating custom in-app settings view, not about Settings.bundle
If you want to do it in the settings app then you need to look up about settings bundles: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html
If you want to have it look like the settings app but be within your app then I'd recommend InAppSettingsKit: http://www.inappsettingskit.com
I'm newbie, so i didn't know how to do ViewController like Apple Settings inside application. Now i know that, so answering on my question.
You can make settings in your application in 2 ways:
Make settings via settings.bundle, that settings will appear in Settings.app (not in your app). More at: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html.
Make UITableViewController and there you can customize cells to appear like native Apple Settings.

Dynamic text block in iOS App Settings

I want to send some log data to the ios app settings menu. I have dynamic text fields that I can change from that app working, but I need a text block now.
What I need to do is have a menu item that has a child view. That part too I have working. You click on View Logs from my app settings menu and it takes me to a blank page right now. How can I add a large dynamic text block? I have tried adding a Group and setting the Key to FooterText which I think is what I need to do. I can specify static text in there right now.
I don't know how to make it dynamic though. Any ideas?
Not exactly clear on what you are trying to do here (maybe clarify?). If you need a large text view then why not consider UITextView. You can jam essentially as much text in there as you want.
Settings is really not meant to serve as a read-write repository in the manner you describe. It is really focused on write infrequently, read many (think LDAP). However, you can make a lot of text data available through settings if that's what you want. Since the fields in settings don't support large quantities of text data, you might consider this approach. Even though it talks about 'licenses and attribution' you could apply this to logfiles as well.
best way to add license section to iOS settings bundle

In App settings tableview from Settings bundle

I want to create a TableView which is automatically generated from the Settings.bundle. There used to be a framework InAppSettings but this isn't working with iOS 7 and up. Is there any other code/tutorial for this?
I have been searching around and couldn't find a boilerplate solution so created my own code for doing this. It supports the setting types Title, Group, Text Field, Multi Value and Toggle Switch.
It does NOT SUPPORT Slider.
This solution does support portrait AND landscape mode and can also handle changing over device orientations.
I have published the code and readme on my GIT.
https://github.com/KingIsulgard/iOS-InApp-Settings-TableView/blob/master/README.md

Ios default icon for open view from list

In every ios app you can have a list that contains elements with subelements.
Tapping on the element will open a new page and you can usually press back to return.
This is indicated with a grey ">" symbol on the right.
Is this symbol downloadable somewhere? I know i can just type a > but it doesn't look exactly like the default icon used by ios.
I'm using Xamarin dialog and a standard RootElement embedded as a list item looks exactly like the default ios but i need to customize it with an icon placed left of the text(which is no problem except that i now lose the default > icon).
Googling for ios system icons, ios default icons and ios sdk did not yield the wanted result. I'm hoping that these icons are somewhere embedded on the device.
I hope you guys can help me out, thanks !
As far as I know there is no way to access a UIImage instance of the chevron during run time. Most likely there is private API for this, but I am not aware of it, and since it's private you are not allowed to use it anyway.
You could probably instantiate a cell that has the disclosure indicator as accessoryType and walk the view hierarchy to find it. But that will break easily, so don't do it.
The best way is to add an image and update it with every new iOS release.
There's the iOS Artwork Extractor which basically gets you every piece of artwork that is used in iOS.
The artwork you are looking for should be named UITableNext. (at least that's the name in iOS6, I don't have an extracted archive of iOS7 yet)
Strictly speaking you are violating Apples rules and their copyright if you use their artwork without Apples written consent.
As far as I know this has never been enforced, and lots of people do it, but it's good to keep it in mind.

Resources