2009-11-27 5 views

답변

6

NSTimer를 사용하여 직접 구현해야합니다. 앞면에서 하나를 꺼내 뒷면에 붙임으로써 textLabel.text의 캐릭터를 골고루 볼 수 있습니다. 이 쉽게 각 문자 조작 후 textLabel.text로 설정 한 후 substringWithRange:deleteCharactersInRange:appendString 등을 사용하여 조작하는 것 NSMutableString을 사용할 수 있습니다 수행하려면 :

완벽한 해답에게 힌트
+0

. charme처럼 일 했어. –

+0

감사의

- (void)fireTimer { NSMutableString *mutableText = [NSMutableString stringWithString: textLabel.text]; //Takes the first character and saves it into a string NSString *firstCharText = [mutableText substringWithRange: NSMakeRange(0, 1)]; //Removes the first character [mutableText deleteCharactersInRange: NSMakeRange(0, 1)]; //Adds the first character string to the initial string [mutableText appendString: firstCharText]; textLabel.text = mutableText; } 
versatilemind

+0

매우 부드럽지는 않지만 코드 라인과 결과는 완벽합니다! – JOM