Determining credit/debit card type

Discussion in 'iOS Programming' started by ct2k7, Apr 4, 2010.

  1. ct2k7 macrumors 603

    ct2k7

    Joined:
    Aug 29, 2008
    Location:
    London or Florida
    #1
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Xcode is the IDE. I presume you mean "how do I code this in Cocoa?"

    Look at the NSString documentation. The methods you want are hasPrefix: and length. The JavaScript code on the stackoverflow.com link could almost be ported line by line to Cocoa.
     
  3. ct2k7 thread starter macrumors 603

    ct2k7

    Joined:
    Aug 29, 2008
    Location:
    London or Florida
    #3
    I've tried and I'm getting absolutely nowhere with it.

    Should I use textField:shouldChangeCharactersInRange:replacementString:?

    I'm still going nowhere with that :/
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    This is pretty basic Cocoa programming stuff... if you're confused here, I suggest picking up a book and start from the beginning. There are threads here that discuss iPhone specific books.
     

Share This Page