Mobile Line Of Business

Richard Jones (MVP)

  Home  |   Contact  |   Syndication    |   Login
  202 Posts | 0 Stories | 36 Comments | 0 Trackbacks


Welcome to the Mobile Line Of Business Blog

Tag Cloud

Article Categories


Post Categories


So,  after fighting it for a while,   I’ve realised that  most  line of business apps  need a grid control.    iOS just doesn’t have this out of the box,  we have UITableView and UICollectionView but they don’t really support the notion of a selectable or editable dataset of records with multiple fields that have dropped down from a database.

So, I’ve been building…   



I’ve taken a UIScrollView and built a sub-class (UIGridView).    I’ve hand painted a header and a body view on-top of this.    I can set headers like this - 

    gvmaintain.addheader("Work Order", width: 110, sortable: true)

    gvmaintain.addheader("Job", width: 60, sortable: true)

    gvmaintain.addheader("Crop", width: 110, sortable: true)



I can add rows like this - 


    gvmaintain.addrecord(fields: [no,job_no,crop,field,plot,work_type,pickpriority,status])


I’ve implemented a delegate to pass back when a user has touched on a row

  func HitRowAtIndex(uigridview:UIGridView,index:Int)


I have gone as far as to implement properties to allow for read-only and multi-selection.

Futures.   I’m now looking to add sorting,  filtering and the ability to drag and drop change column order.

You have to wonder whether the alliance between Apple and IBM we will see a better out of the box solution in iOS 9?



posted on Sunday, March 29, 2015 6:37 PM