OSX to IOS app

Discussion in 'iOS Programming' started by larswik, Jul 17, 2012.

  1. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #1
    Last year I wrote a little program to help me track experience points and roll dice when I game with my friends like AD&D. I posted a video of my program in action on a forum created by the gaming company 6 months ago.

    Yesterday I got an email from the company wondering about my progress on the app (I included a photo of my app). They expressed interest in Mac, iPad, PC and Android version of it as they are rolling out the new stuff next year and would like this to roll out with it. PC and Android are beyond me but the other 2 I can do.

    My Question: In the photo I have a NSTable with 4 columns. Everything I know about UITableviews you can not have multiple columns. How would I approach this problem as I convert to IOS? Any ideas are welcome.
     

    Attached Files:

  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    Why not have the first column be the main title of your cell and then have the other columns be the secondary titles of your cell?

    Something like...

    Strike to Throat
    Brawling - 14 B - 42 XP
    ---(cell border)---
    Next Note Name
    (Skill) - (Crit) - (XP)

    And so on?
     
  3. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #3
    I think I get what you are saying. Instead of working with many columns just set up 1 single tableview and use the different parts of it like the main text, secondary text and perhaps and image on the left part of the cell. Basicly keep it all contained to 1 cell.

    hummm..... I wasn't thinking like that so that is interesting. I was thinking of lining up 4 different tableviews and trying to sync them up. Or create a custom cell with 4 different UILabels

    It sounds like your method would be a simpler approach that I over looked. That might be the easiest thing for a OSX to IOS conversion.

    Thanks for the idea!
     
  4. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #4
    You don't want to combine multiple table views. That would be a nightmare.

    You want to create a custom cell that has fields for the different information you want to show. You could use 4 UILabels in different column positions, or 3 labels and a UIImageView, or whatever. Decide if you are going to support just iPad (easy) or iPhone too (much harder to squeeze lots of info into a table view.) If you decide to support iPhone/iPod touch, consider making your app landscape only, since there is a lot more width available in landscape orientation.

    I suggest using tags for the different fields, and then query a cell's contentView with a viewWithTag message to find the fields that you want. Alternately you can create a custom subclass of UITableViewCell that has properties for the different fields, and set those up when you create the cell. Then in the table view methods that operate on a cell, cast the cell to your custom type and use the properties to read/write your custom fields.
     
  5. larswik thread starter macrumors 68000

    Joined:
    Sep 8, 2006
    #5
    Duncan that sounds like the plan of attack. My last project I did I create a class that created custom cells so I am familiar with that as well as using tags to retrieve the information thanks to Dejo.

    Although their request "it would need to work on PCs, Mac, tablets and ideally as an app for iphone and adroid." They pretty much want it for everything. Had a friend build an iPhone app and he sent it off to India and had it convert to and Android version for cheep. That might be the best thing but as far as a PC' that is out of my area.

    Thanks Duncan for the advice. To keep the same look and feel that as my OSX version that would be the best way. To save space, Art had a good idea too which I didn't even think about.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State

Share This Page