ContactInfoObject

Objective-C


@interface ContactInfoObject : NSObject

Swift

class ContactInfoObject : NSObject

This class encapsulates contact information.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Returns the model data.

    Declaration

    Objective-C

    - (nullable void *)getModelData;

    Swift

    func getModelData() -> UnsafeMutableRawPointer?
  • Returns the field count.

    Declaration

    Objective-C

    - (int)getFieldsCount;

    Swift

    func getFieldsCount() -> Int32
  • Returns the field type.

    Declaration

    Objective-C

    - (ContactInfoFieldType)getFieldType:(int)index;

    Swift

    func getFieldType(_ index: Int32) -> ContactInfoFieldType
  • Returns the field name.

    Declaration

    Objective-C

    - (nonnull NSString *)getFieldName:(int)index;

    Swift

    func getFieldName(_ index: Int32) -> String
  • Returns the field value.

    Declaration

    Objective-C

    - (nonnull NSString *)getFieldValue:(int)index;

    Swift

    func getFieldValue(_ index: Int32) -> String
  • Sets field type, value and name.

    Declaration

    Objective-C

    - (void)setField:(int)index
                type:(ContactInfoFieldType)fieldType
               value:(nonnull NSString *)value
                name:(nonnull NSString *)name;

    Swift

    func setField(_ index: Int32, type fieldType: ContactInfoFieldType, value: String, name: String)
  • Adds a new field.

    Declaration

    Objective-C

    - (void)addField:(ContactInfoFieldType)fieldType
               value:(nonnull NSString *)value
                name:(nonnull NSString *)name;

    Swift

    func add(_ fieldType: ContactInfoFieldType, value: String, name: String)
  • Removes a field specified by index.

    Declaration

    Objective-C

    - (void)removeField:(int)index;

    Swift

    func removeField(_ index: Int32)