答案 0 :(得分:0)
另一种选择是在keyWindow上添加图层,但确保在动画后删除。
void encrypt(char inputText[], int inputLength)
{
printf("%s\n",inputText);
char *begin = inputText;
char *end = inputText + inputLength - 1;
char temp;
while(end > begin)
{
temp = *end;
*end-- = *begin;
*begin++ = temp;
}
char *ascii_pointer;
char temporary;
// ascii_pointer = inputText + 1; => you miss the first character
ascii_pointer = inputText;
temporary = *ascii_pointer;
int *p;
int array[512];
p = array;
while(ascii_pointer < inputText + inputLength)
{
printf("INPUTTEXT: ascii_pointer: %s\n " , ascii_pointer);
temporary = *ascii_pointer++;
printf("temporary: %c\n " , temporary);
// *p = temporary++; => you always write at the first array position
*p++ = temporary++;
printf("ascii_array: %d\n ", *array);
printf("\n");
}
printf("\n");
printf("END: %p:%c\n", p, *p);
printf("END--- MAYBE GARBAGE VALUE: place holder: %c\n ",temporary);
// printf("END: ascii_array: %d\n ", *array); => you print only the first array element
printf("END: ascii_array: ");
p = array;
while (p < array + inputLength)
printf("%d ", *p++);
printf("\n");
return;
}
答案 1 :(得分:-1)
创建一个自定义UIView,您将通过表视图将其作为子视图添加到viewController.view,并为其显示和消失动作设置动画。