How to create a UITableView with editable components? - iphone

I was wondering how to create a UITableView with editable components.
If you look at the network settings in the iphone, where you can enter the static ip address, etc.
How to do this ?
Thanks

http://furbo.org/2009/04/30/matt-gallagher-deserves-a-medal/
Check out that blog post. There's a link to some code named Generic Tables that will give you exactly what you need.
You may have to update some of the code to be 3.0 compatible, but that's just a case of updating the table cell init methods to use style instead of frame.

TaggedLocations project is a very good example of a UITableView with editable components.
You can see this example in Sample code library of Apple iOS:
http://developer.apple.com/library/ios/#samplecode/TaggedLocations/Introduction/Intro.html
Regards

Related

Swift and Parse - PFQueryTableViewController loadingViewEnabled

Good day! I'm using Parse for my swift project, Specifically the PFQueryTableViewController but i want to change the loading view when i open the app. It doesn't look good in my background so i want to change its color and shadow. Also its UIActivityIndicatorView. Is it possible to change this things? Here is the Screenshot for it.
I tried searching for that method in ParseUI framework but i can't find it. I hope you can help me, Thanks!
Only the table controller is unique to Parse. The spinner is just a regular UI element. Thus, the iOS developer references are good places to look for this.
Try this link for the activity spinner:
This link shows information about the controller, which shows that it simply inherits from UITableViewController, and the cells/background can be styled accordingly.
In general, Parse tries to prefix its objects with PF.

Best practices of theming/skinning an iOS app?

What are some best practices of theming/skinning an iOS app?
Examples:
Using custom images as screen backgrounds.
Modifying the look of UITableView tables.
Buttons with a custom look.
Links to good tutorials are a plus.
You can create a protocol that defines methods to return theme-specific colors, images, etc. All classes that conform to this protocol have to implement these methods.
#protocol MyCustomThemes <NSObject>
-(UIFont*)writingAreaFont;
-(UIColor*)dataCellLabelColor;
-(UIImage*)dataCellBackgroundImage;
#end
I can suggest that:
Make theme class
Make function to return background image(s)
Make function to return data cell.
make any required function in the theme class.
the init function should have one parameter to plist file that contains the assets(images) that will be needed for your class to work properly. it should be a plist file that contains a dictionary for a predefined keys.
I hope that helps.
You might take a look at NUI, which lets you modify the theme/skin of an app very easily, and save that theme for other apps, too.
For example, if you wanted to use a custom image for the background of all of your UIViews, you would just put the following in the NUI style sheet:
ViewBackgroundImage String MyImage.png
NUI supports styling for UITableViews and UIButtons, too (as mentioned in your other examples).
You might want to check out Freestyle. It's built on Pixate, and styles your app with structured Sass. You can do as little as change the variable values to make a new theme, or extend and customize it via CSS or Sass.
Old question, but still - if you're looking for best practices, then UIAppearance is probably it.
However, if you're looking for a more powerful way to style your app (and create themes) - also have a look at InterfaCSS. InterfaCSS uses stylesheets inspired by CSS (and Less/Sass) that support a rich selector syntax and lets you use standard UIKit property names.
I know this may be late but I've stumbled upon a theme framework called Pixate. Pixate allows you to theme all your components using css. It's native meaning no web views and what not AND its fairly easy to implement in an existing project. Check it out.

Designing a Login and Registration form using a table view

I am new to the iPhone development.I want to design a login form for an app
which uses a table view .also the user verification from a server.Kindly guide me .A detailed and simplistic explanation would be gr8ly appleciated.....thanx..:)
If you are using iOS5.0, then you can use storyboard to create static tableview as follows:
http://www.techotopia.com/index.php/Using_an_Xcode_Storyboard_to_Create_a_Static_Table_View
You need to have custom UITableViewCell.
Check this tutorial: Custom UITableViewCell
You can also download the example source code from there for better understanding
There are already beautiful fully developed components to do that. Check for example: http://escoz.com/open-source/quickdialog. There you can find a complete tutorial.

Customize ABPersonViewController

Is it possible to add custom UITableViewCell row in addition to built-in email, phone rows inside ABPersonViewController?
I would like to add buttons like add, remove, etc in that cell, which will allow user to be added/removed into/from my application.
Please let me know, Thank you.
Pretty sure you've gotten the answer to this by this point, but I was just looking into do this myself.
Basically, No.
These controllers are not designed to be customized and Apple mentions it in their documentation.
This answer might help you:
https://stackoverflow.com/a/3507849/819355
It subclasses ABPersonViewController which allows you to play a bit with the screen controls...

Any code examples for using a UITableView to implement in-app settings?

Any code examples for using a UITableView to implement in-app settings?
That is where to get the iPhone settings app look and feel one custom builds the settings into a UITableView. So you you would custom set the sections and cells that get returned with switch type statements.
In particular interested in reviewing the coding approach for how to:
best configure the cellForRowAtIndexPath and didSelectRowAtIndexPath
how to handle those cells for which you want in cell editing (e.g. text)
those cells where you need to launch off into another screen to set a date/time for example
how to collect up parameters and pass back to calling rootViewController (in my case need to persist data out to Core Data persistence)
Note: using Core Data so not interested in using libraries such as InAppSettings [any feedback re whether such libraries might be ok appreciated at this SO question I created].
thanks
I am not sure if you can use the inappsettingskit for your needs. It is open source so you are free to modify the code as you wish, but it doesn't look as an out of the box solution.
If you want to make these settings available in the settings app you will have to live with some workarounds for example saving NSDate AND getting a nice UI control to modify it: Use a textfield, there is no control specified which let's you pick a date. Have a look at Apple's documentation.
So the last option will be coding. First of all, determine what kind of types you want to support. Then create custom TableViewCells which reflect those kinds. If some kinds do need some special way of editing, for example a color picker, you'll have to write those controllers as well. You set a cell into editing mode with the delegate method tableView:didSelectRowAtIndexPath and present the custom controller or get into editing directly for example a UITextField. A Slider is handled directly without any coding.
The cells will need some kind of identifier so you can identify those in your model. A TableView and Core Data can interact with each other pretty well by using the NSFetchedResultsController. Create a simple window based app with a template and check the Use Core Data for Storage. The rootViewController illustrates how a tableView works together with Core Data. For your case it will be getting a bit more complicated as inserting a row will have to determine what kind of cell it should add.
I think you should look into this and get back with some more specific questions.