Я бы сделал символ набора анимации NSString с помощью символа, как пишущая машинка. Строка будет помещена в UILabel. Возможно? Если да, то как?Создайте строчную анимацию, такую как пишущая машинка
Заранее спасибо.
UPDATE
метод Возняк работает хорошо, но я не могу использовать его для решения моей проблемы. Я попытаюсь объяснить свою ситуацию. В мое приложение на первый взгляд, я бы показать реальное положение, так что я добавил следующие методы:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
//NSLog(@"didUpdateToLocation: %@", newLocation);
CLLocation *currentLocation = newLocation;
if (currentLocation != nil) {
longitude.text = [NSString stringWithFormat:@"%.3f", currentLocation.coordinate.longitude];
latitude.text = [NSString stringWithFormat:@"%.3f", currentLocation.coordinate.latitude];
}
NSLog(@"Resolving the Address");
[geocoder reverseGeocodeLocation:currentLocation completionHandler:^(NSArray *placemarks, NSError *error) {
//NSLog(@"Found placemarks: %@, error: %@", placemarks, error);
if (error == nil && [placemarks count] > 0) {
placemark = [placemarks lastObject];
[address sizeToFit];
address.text = [NSString stringWithFormat:@"%@, %@\n%@ %@\n%@",
[self sanitizedDescription:placemark.thoroughfare],
[self sanitizedDescription:placemark.subThoroughfare],
[self sanitizedDescription:placemark.postalCode],
[self sanitizedDescription:placemark.locality],
[self sanitizedDescription:placemark.country]];
} else {
NSLog(@"%@", error.debugDescription);
}
} ];
}
- (NSString *)sanitizedDescription:(NSString *)obj
{
if (obj == nil)
{
obj = @"...";
return obj;
}
return obj;
}
Теперь я хотел бы использовать пишущую машинку анимации при if (obj == nil)
на - (NSString *)sanitizedDescription:(NSString *)obj
называется. Как я могу сделать?
Извините, но я в начале с Obj-C :(
Вы что-нибудь пробовали? – woz