I want to add a settings page within my app.
I have seen that there is a way to have a settings page (settings bundle) inside the native Settings app (like here: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html). But I want to have the settings for my app, within my app.
I could do a couple of things, but I don't know which is the right approach... I could use the InAppSettingsKit (http://www.inappsettingskit.com/) or do everything manually which would be very messy(I think?) What have you guys/girls done with your settings in the past, and what do you think would be the best approach to this? And is there a better approach to this problem, than what I have listed above?
Thanks so much :)
Depending the number of parameters you need in your settings, the approach could be different.
If you have a lot of parameters, with the need of rows containing sliders, switches or whatever advanced cell configuration, then using a library such as InAppSettingsKit is a good bet.
On the other hand, if you have only a few parameters, using UITableViewController with Static Cells and Grouped Style could be sufficient. You can do a lot of things in Interface Builder and perform actions in code.
Choose the approach you're most comfortable with, I think both are respectable.
Related
I'm a newbie to iOS and now trying to design an app for multiple roles who can log in from home page.
At first, I tried to give each role a completely separate line of its own view controllers. But later, I found a lot of interfaces and codes are the same among different roles and it will be a huge amount of work to copy and paste.
So now, I try to have only one major line of view controllers and then capture the user identity to change the display (hide and unhide functions) according to different roles. But I'm not sure if this is the real preferred way to handle this kind of multirole application?
(If my question is not clear, please tell me!)
Thanks!
have only one major line of view controllers and then capture the user identity to change the display (hide and unhide functions) according to different roles.
This is the most efficient way to do this, because that way you don't repeat yourself. Having too much code (view controllers) for just small changes will create unnecessary clutter, both code-wise and space-wise.
Even if you are a newbie, try to implement best practices wherever you can, because people generally get used to what they did when they were new, and changing how you write code when you are more experienced is much harder.
First you are new to iOS.Now you are going to develop application with
multiple roles like Register,Login,Showing List,Edit
Page,Settings.....etc.If you are a newbie you can create separate view
controller for above thing.If you want to use string,id,number,...or
anything globally you can create singleton class for access that.If
you gain experience or If you get more knowledge,you can create common
view controller and class for accessing functions,variables in whole
project.Now you must learn basic things for creating application and
use without any error,crash.Learn all basics first.
I'm rewriting an app to ZF2 and I got stuck on problem of aggregating views from many modules on one page. What I want to achieve is to separate functionalities into modules, but still be able to display their views/actions (not sure how to name it) on one page. Let's say I'd layout a page with 4 containers and each of them would display some view from 4 different modules. Is it possible, if yes then how? Or maybe my though process is wrong here (I'm set on separating those functionalities though).
I've tried defining same or similar routes (eg. Module1: /boo/[:yah], Module2 /boo/[:whatever]). It didn't work because first module loaded was apparently served. And it looks like a mess too.
I've read a little about view helpers, but seemed to be aimed at a different purpose of providing common functionalities across many views. Whereas what I need if something like a layouting helper, view aggregation or something. I've worked with a home-made framework before that had this concept of site controllers, that would fire up different controllers actions. I can't find a way to emulate this in ZF2.
I'd appreciate any suggestions.
I've been applying forward plugin for this purpose as described in the blogpost suggested by Sam. It doesn't look elegant, but then I can't think of anything better myself.
I want to have a mail composer view in my app but with a few extra fields and stuff. Since the original view controller Apple provides, MFMailComposeViewController doesn't allow any way to customize it.
So after a little bit of researching I came across the Three20 framework for iOS which provides a view controller called TTMessageController suits my needs. But I did some some checking on this framework and the feedback I've been reading doesn't sound too good. I even tried downloading, following the instructions to add it in a project but that ended up throwing errors also.
My question is, are there any other alternatives to the Three20's TTMessageController? I want to have a view controller where I can add some more input fields to customize it.
Thank you.
Three20 is completely outdated and not suitable for use in a modern Xcode project (using ARC and all the new Objective C features from the last 2 years). Three20 has a very large dependency chain, and you will find yourself stuck trying to make sense of its class heirarchy just to accomplish simple things.
Also, as you correctly pointed out, MFMailComposeViewController cannot be customized in any way other than what is documented by Apple.
The only way to achieve what you want is to start from scratch with an empty UIViewController, and add the text fields you need - either programmatically, or using XIBs or using Storyboards.
I realize this answer doesn't provide you any new information but at least this confirms your feeling that using Three20 for this is a bad idea.
I'm working on building a mobile application for a client using jQuery Mobile. The question I have is fairly basic and non-technical:
The application can have three different types of users, all with a different menu layout. Some users will have access to some parts of the system that other users will not.
My question is- should I hardcode the menu system in the index.html file or should I dynamically create it when they log in? I'm assuming that there would be a slight performance gain by hardcoding the menu and then just choosing which #page to display as opposed to requiring an ajax call...but keeping the menu builder on the server side processing keeps us more agile if need to change the menu after deployment.
Deep apologies if this has already been asked. Thanks for your help!
Build your pages dynamically. On jQuery mobile, a lot of stuff will be repeated and if you want to respect the DRY principle and want to create easily maintainable code, do it dynamically.
Also, by doing this on a mobile application you will reduce the loading times : instead of loading 3 pages you'll only load one, wich can be crucial in mobile developpement.
Hard coding is bad if it can be done dynamically do it because it saves over head and produces nicer code that is easier maintainable.
If you want to change the menu in the future you can just edit the source of information instead of going through all your code having tons of messy if and else statements saying if this person is logged in don't show this option but show this one etc.
I'm wondering what you think of the several methods there are to accomplish this:
Use symlinks for the shared files
Create a gem/plugin that provides the shared files and code
Create a web service that pulls views/partials from the required app and stores it in a cache
My objective is to reduce complexity in a large application. Let's say I want to build an online community, and I want one app to handle forums, another to handle user galleries, etc., and a central one which manages users and provides common views to the other apps.
So, the master application would have to provide a common layout and widgets to all others, and each app would need to provide some views to the master app too.
For example, say the layout has a main menu with an item for each app, and each item has an over-sized sub-menu, so I can't just have a simple list of label and URL pairs.
So perhaps the master app would ask each child app to provide its menu item and contents through a private API, build the menu, save the output in a cache, and send the full menu to each app when asked.
As you can see, I'm already leaning towards option 3, but I wanted some feedback on my approach and if maybe there's a better way.
Thanks for your input.
From what you describe it really sounds like you should be using a single Rails application. The view interdependency makes me think that you might benefit from this approach. I also imagine that testing will be more difficult because your 'application' will span three actual Rails applications.
That said, if you are set on using three applications, I would recommend against using and API. APIs are great for passing data (json, xml...) back and forth, but they aren't as well suited to views. My recommendation would be to create a plugin of common views that could be stored in a separate git repository and simply used within each of your applications. That way the common code is shared amongst the applications yet still locally accessible to all of them.