My programe does get valuse from UISlider and send the value to its superclass through protocol.
child.h
-(void) valueA:(NSInteger *)vA valueB:(NSInteger *)vB;
and I call it in child.m
[self.delegate valueA:sliderA.value valueB:sliderB.value];
but it returns error says “incompatible type for argument 1 of valueA:vA:”
do I have to parse the value before I pass the value? or I just made wrong parameter?
That method should actually be
I changed NSInteger* to GCFloat for two reasons.
The value property of UISlider is a CGFloat, so converting to NSInteger would result in a lose of precision. If you don’t mind, you can change it back, but I’d explicitly cast it, so it’s more clear that’s what YOU want.
I removed the * because you are passing a value, not a reference.