PubSub+ Messaging API For C  7.29.0.6
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ex/ios/Parameter.m
/*
* Copyright 2014-2024 Solace Corporation. All rights reserved.
*/
#import "Parameter.h"
@implementation Parameter
@synthesize paramId;
@synthesize displayName;
@synthesize value;
@synthesize type;
@synthesize index;
@synthesize possibleValues;
- (NSString *)pickerView:(UIPickerView *)pickerView
titleForRow:(NSInteger)row
forComponent:(NSInteger)component {
// When the picker requests a value at a given index, return the
// corresponding value in the possible values array
return self.possibleValues[row];
}
- (void)pickerView:(UIPickerView *)pickerView
didSelectRow:(NSInteger)row
inComponent:(NSInteger)component {
// When the picker value changes, change the index and value to match
self.index = (int)row;
self.value = self.possibleValues[self.index];
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
// The picker UI has only one column
return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView
numberOfRowsInComponent:(NSInteger)component {
// The number of rows in the picker corresponds to the number of possible
// values
return self.possibleValues.count;
}
@end