How do you get value of segmented control on flipside view for mainview Calculation?
Make a variable in your Controller (not your view, link your actions from your view to the controller in Interface Builder). Then you can do two things:
a) When this:
-(IBAction)CalculateButton:(id)sender
is triggered. Let the controller get the values from the flip side view and do the calculation.
b) Make a Model object (maybe very advanced for the size of the app, but its a good design and a best practice)
@interface CalculateObject : NSObject {
//Some variables
}
//@property for all variables
- (...) doCalculation;
@end
When the segment controls change and the controller receives the action, call the correct setter in your model. Then when the calculate button is called. Just call the doCalculate method.
Note: I'm not sure if you know about the Model-View-Controller pattern, but if you don't see:
http://en.wikipedia.org/wiki/Model–View–Controller