MS Excel type spreadsheet creation using objective-c for iOS app

前端 未结 4 1788
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 15:49

I have a sample iOS app that generates multiple reports using data in the app. Those reports looks exactly similar to Microsoft Excel spreadsheets like this.

相关标签:
4条回答
  • 2020-12-05 16:13

    I was looking for a different solution to this issue, but so far I've found: https://github.com/mochidev/MDSpreadView

    Looks like a spreadsheet, and has a similar interface to what a UITableView uses. I was looking for an alternative because the MDSpreadView doesn't use ARC, has a couple compiler warnings, and when I created a library project for it, I noticed it uses lots of images which do not get copied over by default.

    0 讨论(0)
  • 2020-12-05 16:22

    You might want to dig deep into UICollectionView, UICollectionViewFlowLayout and also it would be worth looking into AutoLayout Constraints in iOS6. A helpful link : http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2

    0 讨论(0)
  • 2020-12-05 16:30

    Use multiple tables as columns and when one scroll you scroll the rest of them as well. I create a grid using that and it was efficient to around 10000 rows and 20 columns. If you want i can guide you how will it be done.

    0 讨论(0)
  • 2020-12-05 16:32

    I have never seen anything like this open source, and I don't think there is. So I would try to hand make it. I think there are three ways to go:

    • HTML: This should be the easier way to go. Using a UIWebView to render some pre generated HTML/CSS you can create quite easily that spreadsheet (or even use a JS library).

    • Using a grid view: Either using the Apple solution (UICollectionView, since iOS 6.0) or a third party (AQGridView,GMGridView, etc. There are several, I have only used AQGridView, and its quite complete). The complexity here, is that this libraries are usually developed to show a grid of UIViews, so it's no easy to make them look like the spreadsheet you want.

    • CoreGraphics: This is much more complex, as you need to draw all the lines, and then draw the fields, but is by far more flexible. I've developed a library for plotting a Radar Chart (RPRadarChart) using Core Graphics, and it wasn't that hard. I have a github repo with all the code that I used to learn Core Graphics, if you want, take a look at it: RPCGSandbox

    Good luck, and if you find a better solution, please let us know.

    0 讨论(0)
提交回复
热议问题