iPhone input textfield - iphone

Hi all
Im quite new to iPhone development, I see many applications using a form UI like
http://i.stack.imgur.com/znEex.png
first i thought it was a standard control from the UIKit, but after some searching it doesn't seem to be.
Im interested in knowing if theres an easy way to create this kind of label to the left and input field to the right kind of cell?
Im guessing this design is created with Table Views and each input is defined as a UITableViewCell.
I know i can just create a custom UITableViewCell, but i thought that since i see so many applications using this kind of input there must a standard control or an easy way of implementing it?.

There is no simple way than using custom UITableViewCell to create such UI widget.
and for user input you need to add either UITextView or UIFieldViewto your custom cell.

Basically, you will need a UIViewController as your base with a UIImageView and a UITableView.
There's also a lot of subclassing you would need to do to get it fairly the same.

Related

Create animation like 3D TableView

I want to create UITableView like Zime Android application.
I don't want code but want some advise that how can we create this type of UITableView in iPhone application.
Please suggest.
Not exactly what you want but may be a little better. Check this library named Scroller
You can customise it to have the effect you want instead of building from scratch.

Navigation based iPhone app using thumbnails

I've been searching the internet for quite some time and didn't find anything useful.
I want to make a basic app for the iPhone using simple views and hierarchical data nothing too fancy. The only problem is that I can't seem to find any tutorial that makes the first/main view like a thumbnail gallery that leads to other views.
To clear it a bit up:
I want my first view to be a 2D array of thumbnails and a little text below each of these thumbnails. When I click on a thumbnail it takes me to a sub-view containing more detailed info and options.
So is there any relatively painless way to make something like this using Table Views or something like that or do I have to make a custom view with methods to populate it as my heart pleases.
Please take note that I want to avoid any third party libraries like Three20 or similar.
Thanks
Just to make sure I understand, you want to make an application that acts similar to the Contacts on the iPhone? In other words, a list that when an item is clicked will take you to a new view with detailed information about the clicked item? But in your case, you want an image next to/above the text?
In either case, you will want to use a tableView. If you want an image beside the text, just set the imageView.image property of the cell to a corresponding image. If you want a different layout, however, you will need to create your own custom UITableViewCell, which is not a hard task at all. Here is a tutorial on how to create a custom cell using IB. It can also be done programmatically if you prefer to do it that way. I hope this helps to solve your problem.

iPhone - Proper UI controls for calculations

I am pretty new to iPhone development and currently working on an application which includes a view that performs a simple numerical calculation. In particular, the user enters 3 or 4 values into text fields and the view displays the result. Something along the lines of http://www.moneychimp.com/calculator/compound_interest_calculator.htm
What is the nicest way to achieve this? I am currently using simple UITextFields and a UILabel for the result but it doesn't look nice or "native-like". What UI object would be best to use?
Thank you!
It's entirely up to you. You're using the right classes for actual input- it comes down to how you choose to style those classes. I'd suggest looking at the documentation for UIView and CALayer (youView.layer, and include QuartzCore framework in your project).
A good start might be to choose a color scheme, a background for your app, and the look and feel you're shooting for- this will inform your styling. Try looking for apps that you think are elegant and attractive, and boil down what they do and what you like about them.
I'd say;
use a grouped table style (with the white tables with round corners on a blueish striped background)
embed settings values directly in the cell (aligned to the right) as much as possible
you can show a relevant keyboard (text, numbers) or picker view to let the user pick values, directly when they tap the cell. Use sliders and switches where relevant.
You may want to take a look at http://www.inappsettingskit.com/, we are currently investigating it for the same purpose and it seems to do the job
You can use either a UISlider or a UIPickerView if some of your values have limits.
You can use UISwitch for toggles.
You can also switch the default keyboard for your textfields to be numeric.
Other than that you seem to be on the right track.
Also, sometimes putting a view inside a scrollview makes things seem cooler even if its only one page. The auto bounce on scrollviews is kind of cool.

Bubble Chat + Emoticon + UITableViewCell

This is a question for iPhone development and I'm hopin someone can point me to the right direction on how i should go about implementing this.
I am trying to write a chat application that supports emoticons/smileys. Where the smiley/emoticon images are stored can be figured out later. I think few iphone applications out there are already doing this (i.e. skype + ebuddy(?)) but not sure what method they went for.
After searching around, there seems to be a few ways of doing this (i think):
bubble chat style which has been discussed before. UITableViewController with custom UITableViewCell. For emoticons, might have to do a whole bunch of calculations to determine where to stick a UIImageView for each emoticon.
Use UIWebView as the whole "window". Style it to look like bubble chat. Takes away any manual calculations on image smiley placements.
I have no idea what the performance is like for each of these two methods, how complex it can get etc, so any comments and guidance will help for sure. Cheers
If you use custom UITableViewCell, then I'd probably implement drawRect: instead of adding labels and images. One will probably take as long to implement as the other, but it will perform much better.
The UIWebView might be worth a short, although you will have to make sure that everything looks right there, too. Instead of using one big web page, I suggest simply throwing in a web view into each table view cell.
Personally I prefer the first approach, measuring and layout of text is not too complicated, but then I've never been the ultimate HTML guru.
I agree with #Eiko on making custom UITableViewCells, especially using drawRect instead of adding labels, images, etc.
If you used a UIWebView how would you handle updating it? A complete reload each time new text is sent? That seems like it will be a cause of issues. Once you get a long conversation reloading the entire UIWebView's contents will cause some flickering which isn't acceptable in my opinion. Also using a UIWebView would require you to have 2 complete copies of each conversation in memory. 1 as your backend data and 1 as the HTML. Where using a UITableView you have your backend data, and only enough of that will be duplicated that can fill 1 screen at a time.

How to implement a large grid of cells in an iPhone application?

In reference to my previous question, I would like to know how to implement a large grid of cells in an iPhone application.
I'm working on an interface which would be similar to an Excel spreadsheet, with many rows and columns. Do I have to handle each cell separately? How can I handle user interaction in each cell?
Is there a standard way to create this type of control?
There is no real standard mechanism.
If all of the cells in a given row will always fit in the width of the screen, one way to do it would be to create a UITableViewCell with several UILabels and vertical separators between them. If all of these rows had "columns" of the same width, you would get the appearance of a grid.
If that isn't possible, it might be helpful to think about what the table view control truly is. A table view is just a scroll view that automatically adds, removes, and recycles its subviews so that only the ones that are visible at a given time are in memory. There is no reason you could not write a GridView control that did the same thing, but in two dimensions. It wouldn't be as easy as using the built-in table view, of course, but if the table view can't do what you need, well, that's why Apple isn't writing all the apps.
Sounds like the exact thing that UICollectionView was made for!
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UICollectionView_class/Reference/Reference.html
Look at my answer to this question: MS Excel type spreadsheet creation using objective-c for iOS app.
Basically there's no standard way to do this. You will need to made everything by hand and there's 3 ways to go:
Use a UIWebView and layout everything using html/js.
Modify a UICollectionView.
Make everything by hand using Core Data.