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

前端 未结 4 1843
伪装坚强ぢ
伪装坚强ぢ 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: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.

提交回复
热议问题