0

I would have to use a necessiva progressView for the management of a small form. In a nutshell I have several actions that the user must carry through a click of UIButton and these actions should increase the progressview until completion . Let me give an example :

Let's start with a progressView set to 0.3

Button 1 is clicked and doing the action increases the progressview of 0.1 , so the progress is updated up to 0.4

The button 2 is clicked and increased by another 0.1 , and then the progressview becomes 0.5.

That's what I should do ... Currently I am stuck because if I make these actions I find myself 0.3 ( starting ) to 0.1 instead of me that serves 0.1 increments to any button is pushed ..

How can I solve the problem ... ? ? I'll post a little ' code

- (Void) viewDidLoad
{
    [super viewDidLoad ] ;

    FFProgressBar.progress = 0.3 ;
}

- ( IBAction ) FFAddVotazione : (id ) sender {
if ( FFVariabileNumerica_CFU_Votazione > = 30 )
return;
FFVariabileNumerica_CFU_Votazione + + ;
[ FFVotazioneLabel setText : [ NSString stringWithFormat : @ " % d", FFVariabileNumerica_CFU_Votazione ]] ;
    [ FFProgressBar setProgress : +0.1 ] ;
}

- (IBAction)FFAddCFU:(id)sender {
if (FFVariabileNumerica_CFU_Votazione >= 30)
return;
FFVariabileNumerica_CFU_Votazione++ ;
[FFCFULabel setText:[NSString stringWithFormat:@"%d", FFVariabileNumerica_CFU_Votazione]];

    [FFProgressBar setProgress:+0.1];
}
kAiN
  • 2,559
  • 1
  • 26
  • 54

0 Answers0