GroupedTableView in iphone - iphone

i want to create a grouptableview for my application in which some section are editable and some are checkedmark can any body tell me in details to how i do this ,
i want to put content in row like 'placeholder in textbox'.
I have tried many times and search in google bt i m nt getting any idea please help to out this issues.
i want to create grouptableview like this image for my application.
!Screen shot

If you want to edit the content of cell, you have to add UITextField/UITextView to the cell. You can very well assign a placeHolder for the UITextField/UITextView. Refer this SO Post.
For check mark you can use default cell by toggling its accessoryType between UITableViewCellAccessoryCheckmark and UITableViewCellAccessoryNone.

based on your noofsections you can create the no of groups.

Related

Use of unresolved identifier 'section' in tableview

I am coding a tableview with users posts to display. I am currently trying to break it into to sections to where the first section consist of the posts by users and the second section consists of a spinner cell that loads more posts. I keep getting a small error in my code shown here. If anyone can explain why I am getting this issue when I have never had this issue when running similar code. Thank you.
I'm not quite sure what you are asking but I think I still might be able to help. I am currently working on a project with a table view also. I would try creating a variable or some other data type that contains the specific cells you want to be in that section. I would use indexPath.row to add these cells to that variable. I would then try running an if statement with that variable that contains those specific cells and then running the code based on that.
If indexPath.section == 0 {
...
}

Create new contact view

I have been told to do the following:
Implement contact add view like below and let him store in SQL table,
contacts will have Name, phone no of mobile, work , fax, email . view
should look like below:
My question:
Can you clarify me, should I use Addressbook or simply a custom view and a sql database to save data from that custom view? I mean both the options are open here?
You can not use address book to create custom content in your application.
So you should implement your custom view to collect information to store in your database (sqlite?)
If you are creating contact / modifying existing contact information, you can use address book framework.
Answer for the question in comment (how to go about for this kinda UI)
Yes, Have the grouped table view to get the desired background
Among the many possible solutions, here is the simplest one perhaps:
Have 2 sections in your table.
First section has a special kinda cell. Only one row in this section.
You can use Interface Builder to create the cell contents or you could build from code.
Second section contains similar cells. It can contain as many as the fields you need.
Just specify UITableViewCell's style to be UITableViewCellStyleValue2 and specify the values accordingly

How to make a good profile view

I've created a vue called profile in wich I put labels that I've named (frist name, family name,adress,etc etc) and for each label there is a textield,
so my idea is to display on the textfield by default for example : enter your first name, enter your family name etc etc, so that once we click on the textfield , the keyboard get displayed.
Is there anybody who can help please ??
my opinion is use tableview for get input from the user
use this tableviewcell to tableview which will look awesome follow this tutorial
http://www.icodeblog.com/2011/01/04/elctextfieldcell-a-useful-tableviewcell-for-forms/

accessoryButton with Instruments automation

I'm writing some automation .js file, and I need to tap one of my accessoryButton from one cell.
How can I send the tap message to it ?
This is a custom cell, but the accessoryButton is added by iOS, not by me, and I don't know wich name it has.
Also in the docs I couldn't find anything ...
I have the cell referenced correcly as I can change the textField value for example.
Thanks in advance,
regards
I would take a look at the buttons property on your UIATableCell. That should give you the buttons in your cell and you can probably get to the accessoryButton from there. UIATableCell does not seem to have a specific property for the accessoryButton (cf. here).
Source: Apple UIAElement Documentation

How to add a label in a settings screen

As a picture says more than a thousand words:
alt text http://img.skitch.com/20091008-k16k7we3t43gj3h7htgtjpunpx.jpg
Any help on how to add descriptive labels to a settings pane would be highly appreciated!
I should point out that I want to do this to be in the iPhone-App settings that are in the Settings menu of the iPhone (outside the App).
Example label:
iPhone -> Settings -> Safari -> Fraud Warning
The label beneath: "Warn when visiting fraudulent websites."
For reference: Since iOS4.0 and above a FooterText key was added to PSGroupSpecifier that does exactly what you are looking for.
http://developer.apple.com/library/ios/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/SettingsApplicationSchemaReference.pdf (pg 11)
Unfortunately, Apple has not given iPhone developers the capability to add the kind of label you're looking for in Settings.app. As a near approximation, I've used PSGroupSpecifier under another setting element (such as PSToggleSwitchSpecifier). It's not as elegant as a true label, but it worked well enough in my situation (I only had one setting, so it didn't conflict with any other group headings).
alt text http://pseudorandomengineer.com/images/6.png
Try using a PSTitleValueSpecifier in your settings bundle's plist. I'm not sure how that formats itself—most likely bold, like the group headers—but it might be what you're looking for.
If you want to simulate a label that is center-justified, add an empty title PSGroupSpecifier and put your label text in the FooterText Key.
Check out the tableView:titleForFooterInSection: method of UITableViewDataSource. You can return a string to be displayed below a table view section. If you're already using a UITableViewController subclass, just implement that method and you're good to go.