Existing iOS form framework - ios

Hello I am building forms over and over in iPhone and iPad apps:
Custom UITableViewCells for labels with input
Localization for labels, placeholder text and section headers
Validation that marks the cells red or something and does not allow "Submit" if form is incomplete
Clicking in the cell activates the editable text box
Next / previous buttons
Reliable across devices, orientations, iOS versions
I can't imagine I'm the only one doing this. Is there a mature framework or something that can drop in and use? Could you please comment on how you use this library with designs other than vanilla UITableViews with your own colors etc.?

Take a look at IBAForms - an open source project from from Itty Bitty Apps. I haven't used it yet myself, however I believe it does most of what you want, except for validation. Here is the github page: IBA Forms
It hasn't been maintained in a while, but if you're looking for a forms library - it's mature and works. At the very least, it could be the starting point for something you take further.
Update: There is also Chris Miles' EZForm library, which is very nice.
Update #2: Have also started checking out QuickDialog, which seems to be very popular.
Update #3: Nick Lockwood has created one called FXForms
Update #4: Martin Barreto has created one called XLForm

I don't know if this counts as an answer, but i use Sensible Cocoa - Sensible TableView (STV) for this purpose a lot. It's not a "forms" framework (on top of UITableView) as such, but it can be used for this purpose in a very flexible way. It still requires some coding to build a full-fledged form but the UITableView/UITableViewController boilerplate code is reduced to a minimum. Unfortunately the developers bumped the price tag quite high with version 3.0, so i'm actually looking for a STV replacement right now. (I'd stick with STV if it wasn't for the price!)

I don't know of anything that combines all those features, but I recently open-sourced my validation library PMValidation on github, which I used developing the iPhone app Imprints. PMValidation comes with many basic types suitable for validating forms, and in fact that's what I originally built it for.
Using the PMValidationManager class you can easily listen to UITextViews or UITextFields, and update whatever graphical widgets you want via notifications. It's very modular and easily extendable, should you have more unique needs. It's under the MIT license.

Related

How to show tabular data in a nice and practical way

My iOS app is a mobile version of a management program I had developed for a company as a desktop application. So its main tasks are saving data in a database and retrieve them when needed with the option to edit them. So I guess that the GUI is mainly composed by forms to fill in and tables to show data. So I am asking you if you could link me some tutorials or give me some tips on how to realize them in a nice way but not too complex. I'd rather avoid simply creating a blank view controller and inserting labels and text fields without a minimum of criterion. I am very new to iOS and XCode and, as I have not too much time, I am asking directly your opinion instead of spending hours in looking for tutorials.
UPDATE!
I mean that I would like to get something similar, for a mobile iOS device, to the following screenshots (from the desktop application I mentioned above)
Seems that you need a grid control to do it.
You can develop your own, or use existing library.
I have very good work experience with Infragistic http://www.infragistics.com/products/ios/grids/grid-view-layouts, but maybe DataForm from Telerik will be better in your case http://www.telerik.com/ios-ui/dataform

Is it important make use of standard iOS components?

We are creating an iOS app that does not look like any other app you would find in the app store.
My question is, am I allowed to create custom components such as header bars, tab bars, tables etc. for my app and not get rejected by Apple when publishing the app to the app store?
Months of thought and planning has gone into the UI and flow of the app, so the user experience would be superb, we're just concerned about how apple feels about custom apps/components like these?
Regards
There's nothing inherently wrong with creating an app that's got a completely different look and feel to everything else.
But what I would advise is that you try to use the built-in components as much as possible. In recent versions of iOS Apple have introduced a number of APIs to let you customise their look and feel significantly, and some of the most innovative UIs out there are simple table and collection views that have been hacked to pieces.
This is because Apple's built in components have logged many hundreds of thousands (if not millions) of hours of real-world testing and use, and are thus vastly more stable and field-tested than a totally custom component. Plus, they often have various built in features (such as a scroll view's bounce) that are hard to replicate on your own.
So definitely customise your interface as much as you like, but while you're doing it think about whether you can harness the built-in UIKit classes rather than totally re-inventing the wheel.
More and more custom controls appear for iOS every day. If it is so good as you say, Apple will be happy to accept it. Don't worry.
Also take a look at these cocoacontrols
As said before, Apple will not have a problem with that .. as long as you don't use any private APIs. If you are developing these components on your own, you will have to make sure that these will work in future releases (which is not necessarily a bad point) . This may be a problem with third party components, as they may not be continued (or supported in future releases).

Making UITableView look more like a "conventional" table, with multiple columns

I have a pretty much standard UITableView, but I would like to change it to look like what would be considered a normal table outside iOS development -- make it have more columns (but just one row) and make the cells square-shaped.
I thought about making more tables (one for every cell) and then placing them next to each other, but that wouldn't be so convenient.
Is there maybe a simple way to make cells go on the right of the one before instead of going below?
Use some third-party classes that allows you to have "Grid Views".
One is my OHGridView class, another is NRGridView, and there are many more. If your app needs to be compatible with iOS4 and/or iOS5, using a third party class (or building one yourself) is the only option.
Under iOS6, there will be some other stuff that allow you to do that directly (iOS6 still under NDA so we can't talk about it publicly yet, but go read the API Diff files in the developer.apple.com website if you have access to them). So if your app is intended to be compatible only starting iOS6+ and you don't need support for iOS5, this could be the solution and you should go read about it if you have a developer account with access to the iPs6 SDK.
What you're looking for us UICollectionView.

How to set width and height of TableView cells In BlackBerry?

I have created a table in BlackBerry Java using TableView and TableModel.
Now, I want to set the width and height of particular cell. How can I do that?
You have multiple options. It partly depends on what features your table needs to support, but also what OS version you are targeting (what minimum OS version your app needs to run on).
Here are a few choices (I'm sure there are more, too):
if you can accept supporting only devices with OS 6.0 or above, then you could use the TableModel, and its associated classes from the RIM libraries. See this page for an example of that. This is a fairly well-architected approach to separating model from presentation. There are also other classes, RichList and SimpleList that were introduced in OS 6.0.
if you need to support older OS versions, you could use the ListField class, or the subclass called ObjectListField. ObjectListField is especially easy to get setup to display a simple list (table). But, you may find it limiting, and need to resort to a third major option ...
you can always make your own list/table, by extending the Manager class, or using VerticalFieldManager. Each row in the vertical list would be a Field that you can define however you like. Here's a recent stack overflow question I answered showing some code that basically does this. If you're coming from Android or iOS, you might find this to be a little more work than you'd like, but it will give you complete control, and can support any OS version.
This is a bit of an open-ended question, so you may need to provide some more specifics about how the table will look, or what kind of interactions each row will support - for example,
is each row selectable?
does each row have multiple fields within it, and are they each clickable/selectable?
does every row fit a consistent format, or do some rows have unique layouts?
Then, we might be able to give more specific recommendations.
P.S. There used to be a great link that BlackBerry maintained (like what Google has for Android) concerning the market share of current devices. It died, and this is the best replacement I've found (update: link now also obsolete!). It looks like probably 80% of paid smartphone apps are downloaded by phones running OS 6.0 or above. It's hard to tell exactly, as that link is showing data as of May 31, 2012. But, that at least gives you an idea, if you don't know which minimum OS to target.

Creating own iOS-controls with Flex

I was looking into creating iOS-apps (especially for the iPad) with the Adobe-Flex framework. It looks very promising to code apps this way.
Is it possible to create own controls/widgets? In the far future I might want to create my own kind of gantt-calender or whatever. Is something like this possible and are there any good tutorials/book out there?
Thanks in advance!
UPDATE: I want to create iOS Components that I can use in Flex. Controls, that are not aviable by default in Flex. Is that possible? By derivating or something?
UPDATE 2: In the meanwhile I found FlexLib to be useful. How hard is it to create stuff like this on your own? Especially for mobile devices. Are there any good tutorials, books, etc. out there?
Yes, you can create your own Controls in Flex. They are commonly called Components. I suggest you start by reading the Flex Docs on how to do so. There are also plenty of other resources out there. One is a screencast series that I created for The Flex Show. Here is episode 1.
You had asked:
How hard is it to create stuff like this on your own?
It depends on what the component wants to do. The commercial components we've built at www.flextras.com have taken from three to twelve months to build. Our Calendar is built from scratch, but most of the other components extend existing Flex Framework components.
The Flextras stuff are architected for reuse. A "single use" component for a specific app can be built in 1 hour [and up].
Once again, the purpose of a component will affect how long it takes to build.
#chiffre
Ok, maybe I am guessing wrong but "iOS controls" makes me think not to "flex controls".
Anyway with Flex 4.5.1 you can add any controls you want, the only thing that you must count (and this counts a lot) is performance.
Read especially about item renderers since scrolling list is not so fast on iOS and how you can make use of cacheAsBitmap.
Also keep in mind to always use light controls when needed if not extend base controls like UIComponent or Sprite and not Button if you just need a rectangle.
Here are some links
http://blogs.adobe.com/flashplayer/2011/06/adobe-air-2-7-now-available-ios-apps-4x-faster.html
http://www.adobe.com/devnet/flex/articles/mobile-development-flex-flashbuilder.

Resources