It sounds like you're trying to develop apps for iOS; if so, you'd do better to post your question (and probably a more specific one at that) in the Programming forums here. This one is for assistance with general MacOS user issues.
Also, have you read through Apple's reference library on those two classes? Their documentation is pretty thorough.