I'm developing the settings page for an iPhone application I'm working on. The basics are simple enough but there are some interesting things I've seen in the settings for some of the default iPhone and I was wondering if they are easy to create.
Two things in particular are having a UITextView as a child pane (an example of this is the signature in the Mail app settings) as well as having settings appear and disappear based on a switch (an example would be in the Wifi settings).
Any ideas if these are somewhat easily achievable?
EDIT: I'm aware I can achieve a similar effect by creating a custom settings page. What I want to know is if the things I mentioned are possible for application creators.
Use UITableView and build your custom subclasses of UITableViewCell class for various settings. You can easily manipulate a table view for making things appear and disappear dynamically.
As #Kakosquid suggested you can try a table view with custom cells. You can go through this tutorial for more info on custom cells
Related
So basically I have made a storyboard based app which consists of table views and text. It is designed to help new programmers like a handbook. You have a table view which allows you to choose a language, a table view which allows you to choose a section (eg initialisation) a table view to choose a subject (e.g. integer) then a text view of how to go about this.
When it was reviewed, they said
Did not include iOS features. For example, your app was just largely
text table views. It would be appropriate to use native iOS buttons
and iOS features other than just web views, Push Notifications, or
sharing.
I feel like adding these things would degrade from the simplicity and educational purpose of the app. Also, I feel it might be more difficult to navigate if its all iOS button based. Also it might be more difficult to add things later.
So how would you go about adding these things to a table based app so that it can pass the review? I just don't know what they want me to add/change. I have just added a title page with a background image and iOS buttons that direct to the main section a small section and the contact us page. What else can I do?
how would you go about adding these things to a table based app
I'd start by trying to forget about what I'd already done (since that was rejected) and ask myself: how can I design this using the tools available so that the user can quickly get to the information they need?
UIPickerView comes to mind. Instead of going through three screens just to say what you want, a picker with three sections would let you select all three parameters at once.
It'd be nice if you could provide access to the information in the app several ways. What if I want to browse through all the topics? Do I have to choose one section at a to,e, or can I just start reading? A search feature would be nice, so I can find stuff even when I don't know what section it's in. A tab bar and search field would be useful for these.
Perhaps the most important thing is that however it's designed, your app should look polished. It should look like you spent time making it useful and beautiful. Give it some personality.
I am trying to make an update for my trivia app and want it so that when the user types in the answer he/she only has the option to click A,B,C, or D. Is this possible? and if so, would apple allow this and how do I do it?
You could also just create a custom view with four buttons that appears when necessary. It would be easier than customizing the keyboard, and depending on how you design and implement it, it'll probably look better than an action sheet. UIView provides a rich set of methods to animate views with ease.
Yes, you can customise the keyboard, all the documentation is in the developer library. But it sounds to me you'd be better off using a UIActionSheet if all you are doing is picking from four options.
Edit: For reference, have a look at Custom Views for Data Input in Apple's Text Programming Guide for iOS.
I wanna customize cells in MonoTouch.Dialog.
For example make custom background in BoolElement and make custom image for this small bool thing that can be on or off, sorry forgot the name, or make custom disclosure indicator image in StringElement.
Is there simple way to do this without making own custom elements?
In some cases you'll need to create custom Element-derived types to customize cells. In other cases you will be able to add some custom code inside your application. FWIW I think it's cleaner to create your own everytime.
You can find a lot of examples in the Sample application that is available on github along with MonoTouch.Dialog (that includes having a custom background and totally owner-drawn elements).
There are also several questions (with answers) about common MonoTouch.Dialog customizations here on stackoverflow. Click on the monotouch.dialog tag and read them.
If you get stuck on a particular customization then don't hesitate to ask for help.
I have noticed that in some apps they use what appears to be the the native display screen for a contact, it shows the contact photo, name, phone numbers and options to text message and add to favourites.
But it also will have some customized fields in it also like missed calls or some other non native contact information,
Here is an example screen shot taken from the Viber application:
I am quite new to iPhone development and I was wondering if this screen is made available to developers so that a contacts information can be presented from within an application with custom fields or if it is not and has to be developed from scratch?
EDIT:
Thanks for the help, with it I have successfully recreated the screen in a static manner, I have one more question and that is how would I make the cell that has the outgoing calls in it react to dymanic data?
So for instance there could be 10 calls there, so how do I adjust the size of the cell on the fly? And also whats the best object to use to allow the calls to be displayed? At the moment I'm using a UITextView to display the static data but I dont think this will work for dynamic data?
I think the developer made this screen there self, it just an UITableView with some custom UITableViewcells.
You can use the UITableView haderView property to insert the the top view with the image.
The just add sections for all the white cells, make use the the tableview style is set to grouped.
The screenshot is probably showing a custom UI that is made to look similar to the standard one.
You can get a similar interface with some limited customization options with the ABPersonViewController class (in the AddressBookUI framework). It basically takes an address book entry (ABPerson, you can also create this from scratch) and allows you to specify which properties (phone numbers, email addresses...) to show.
You can also customize what happens when you tap on a property by implementing the personViewController:shouldPerformDefaultActionForPerson:property:identifier: method in the view controller's delegate.
The above screen can be created by using UITableView. Since u're new to iPhone..I would suggest you to first go through some basics.
For UITableView, Here's the Link..
UITableView Class Reference
Also look for UITableView Cell Formatting in google.
Hope dat helps... :)
happy coding
So it's trivial to create a Settings style table on the iPhone. The problem is, they add a great deal of code as your Settings have a gamut of options/styled cells. One section might have a check list, another might have cells with accessory disclosures to drill down further, another might be labels with UITextFields.
My question here is, what's the cleanest way to go about creating this table. Do you typically create a subclass of UITableViewController and then subclass UITableViewCell for each different type of cells, and write supporting classes for those cells? Meaning if you have a Settings style table with 4 sections, all different types of cells, you will load 4 nibs into the table and import 4 class files? Programmatically set the frame, views, textfields and tag them for later access?
The answer(s) to this is probably subjective, but I'd like to know what you experts consider the most elegant approach to this common problem.
The easiest way to do this is to simply add your controls during the tableView:cellForRowAtIndexPath: method.
I also recommend this to help corral your code:
A technique for using UITableView and retaining your sanity
I would rather set most of the settings that I can in Interface Builder, instead of writing a whole bunch of code to make the visual/layout just right. As you can imagine, it will take quite a few rounds of "modify - build - test" in the iPhone Simulator to get this special table view laid out the way you want it.
I feel it's probably a bit easier to do all of these rough visual changes in IB, then load all of the custom UITableViewCell dynamically via their identifiers in code. You could then do one final round of tweaking on this code, if something that you want is not doable in IB.
Three20 library (extracted from Facebook iPhone app) has a set of ready-made cells that contain various controls.
(Not sure you want to use them, however. Three20 suffers from “not-invented-here” a little bit and tries to subclass and extend everything, so adding it adds quite a bit of a mess to your project. But at least you can use it as an example.)
P.S. Your question inspired me to open a “What are your favourite UITableView / UITableViewCell tricks?” thread on Stack Overflow, check it out for more tips.