Is there an easy way to a Settings.bundle style form in an app? I have seen InAppSettingsKit, but I just want to create a form for data entry that has some nested pickers and other features simple to implement with Settings.bundle.
It is very easy to achieve, the settings screens are simply grouped table views with the standard styling.
With storyboards, the "static" content feature makes it even easier - this mode allows you to specify the contents of each cell right there in the storyboard, you don't need any datasource methods and can do it all via outlets. There is a good tutorial on Ray Wenederlich here
Related
I am wondering what people think the best way to create collapsible disclosure views would be for iOS similar to the example below in Etsy's app.
More specifically I would like to have the views have input fields related to the headers, and I'm not sure whether or not table views and cells (which seem to commonly be suggested for collapsible sections) are able to handle that. (Though if so, feel free to link me to resources!)
Thanks!
So far I came across many developers are using Custom view controllers instead of .xib file often. Can anyone tell me that which one is the best way? using custom or static?
It's your wish, use what ever you feel is easy for you. I prefer custom , because it gives me much more freedom to play with my custom views. Yes it is much more laborious , but you have more control over it(what i personally feel).
It would be great if you elaborate your question...
here is a small example where i used custom. The data to create views (like textfields , buttons etc) was being provided to me in form of XML (from server). So this XML can be changed any time at server end. which means if my view is rendering 3 textfields today, on changing xml it shows 10 textfields. So if your view is not static or fixed, you should use custom method.
In IN SHORT - fixed or static view -use xib (you can use custom also). in case of dynamic,you can (should) do it programmatically.
if you are designing UI with code (not using Xib/Stotyboard) this will be good when you create UI dynamically so then you need not to spend more time on changes. what ever we use for development (Code/Xib/Storyboard) nothing will be changed in performance. As per user/developer comfort we will go for it. Suppose there are lot of UI need to be displayed few at the time viewdidload and rest after some button action then usually at the initially stage itself Xib and Story board will load all of them and hides un wanted and as per actions it will show the hidden UI. i feel coding is better for me.
I am writing a text editing app. I target iOS 6 and 7, and use storyboards and autolayout.
I thought this layout for the welcome screen would work well:
<Files in a table view>
<Instructions to user>
<Settings>
The settings view is pretty complex, and will probably benefit from having its own view controller. The instructions view is static, and has no logic.
I can think of three ways to organize this:
Create this as a table with three sections, where the 1st section is the list of files, and the 2nd and 3rd section are big, custom cells with.
Wrap all three views in a scrollview
Wrap the instructions and settings in a scrollview
I prefer the first solution, as it seems to be the, most natural way for the user to navigate, but I haven't seen any examples of adding a viewcontroller as a cell for a tableview anywhere, and haven't been able to google me any. Prototype cells do not seem like the right way to go for the settings view/controller either.
Best practice, suggestions, input?
Apple recommends only one view controller per "screen," so that rules out option 1. I wouldn't want to even start to attempt to embed a viewcontroller in a table cell and that just smells very wrong in any case.
You have three independent views that you want to scroll, and that clearly calls for a UIScrollView. As for the best way to organize this, I recommend creating modular UIView subclasses: one for the table, one for the instructions, one for the settings. See my answer on this question as to how you can package up views as reusable (not important in your case) and modular widgets: UIView and initWithFrame and a NIB file. How can i get the NIB file loaded?. Then you can create delegate interfaces for each one, and set your main view controller to implement them in order to communicate with each of the three "widgets."
I'm writing a app that contains quite a bit of input fields for collecting data.
and im wondering what are some good methods to display these kind of input fields, if there are too many to fit on a screen? so something like the add contact screen... where u can scroll down and there are fields there
my initial idea is to put them in a scroll view and then i can scroll through them, is there a tutorial to do this? it seems like the scroll view is more for dynamically displaying data like a text view, and not for static forms like i was describing.
if anyone has any different methods for doing this please post.
UITableview will match perfectly for what you need.
My friend wrote this which is a container view that automatically helps with moving fields out of the way of the keyboard - It will certainly save you some time if you don't want to use a UITableView:
https://github.com/mackross/GTKeyboardHelper
The other way as H2CO3 suggested is to use a UITableView. If it is a UITableViewController, then you get the moving out of the keyboards way automatically. You could build custom table view cells that are styled to have a prompt and a UITextField for input. You can also set the selectionStyle to UITableViewCellSelectionStyleNone to prevent these cells from highlighting when selected.
I think the third way is to do this with a UINavigationController (or a UIPageControl) and build a kind of wizard, where you go through various pages of related data. This might be the neatest way depending on how many fields you have and if you can group data into common sets (e.g. personal information, work information etc)
I had the same problem and found GTKeyboardHelper to be an easy way out.
After drag and drop the framework in your project, include the header file.
Download and open the example project, then drag the "Keyboard Helper" object from the objects section in the xib to the objects section in your project's interface builder.
Drag and drop all your views to be children of the "Keyboard Helper".
I am working with a storyboard, and I have some pages on the app that have content. Instead of manually creating styles for headings, and texts by using the right side of the screen little color/font editor, is there a way to just create a single style and use it throughout those content pages?
Thanks!
Since you only want the styles to affect some of your labels, I would suggest creating a subclass of UILabel for each different style you want. In each subclass, implement the awakefromNib method to set the style properties of the label. Then, for each label you want to have the style applied to, set the class in interface builder to be your subclass
Yes there is, but it would require you to use a stylesheet framework.
For example, three20 has a TTStyle framework, which is really good at creating style classes that you can apply to labels, buttons, and views.
http://three20.info/
Check out this tutorial:
http://www.mattvague.com/three20-stylesheets-tutorial
I believe Nimbus Kit also has a style library, but I have not explored it as much:
http://nimbuskit.info/