In my project, I’ve got 10 of these code here:
- (void) makeAnim1{
//downward animation for carousel
[UIView animateWithDuration:**3.5**
delay:0.25
options: UIViewAnimationCurveLinear
animations:^{
carousel.frame = CGRectOffset(carousel.frame, 0, **490**);
}
completion:^(BOOL finished){ //task after an animation ends
[self performSelector:@selector(makeAnim1_1) withObject:nil afterDelay:3.0];
NSLog(@"Done!");
}];
}
- (void) makeAnim1_1{
//upward animation for carousel
[UIView animateWithDuration:**3.5**
delay:0.2
options: UIViewAnimationCurveLinear
animations:^{
carousel.frame = CGRectOffset(carousel.frame, 0, **-480**);
}
completion:^(BOOL finished){
//timer for the reveal button
[NSTimer scheduledTimerWithTimeInterval:0.1 //this arranges the duration of the scroll
target:self
selector:@selector(revealButton)
userInfo:nil
repeats:NO];
NSLog(@"Done!");
}];
}
I wanted to make them in just one short implementation. So they will be just one function.
I’ve tried putting the needed values and assigning them in the bold version of the code.
I need to have two arrays that corresponds to each other. For example:
arrayA[3] = A,B,C;
arrayB[3] = a,b,c;
When A is pick it is equal to a.
Try this below code :
You can convert Array Values to Uppercase or lowercase like below code:
A array contains first index is A to convert a
B array contains first index is a
Thanks…!