UITextField Crazyness - PullRequest
       6

UITextField Crazyness

0 голосов
/ 04 октября 2009

так вот сокращенный код:

 - (void)viewDidLoad {
        [super viewDidLoad];
        currentLocation = [[UITextField alloc] init];
        currentLocation.delegate = self;
    ........
    }

    -(void) setState:(NSString *)state andCity: (NSString *)city {

        //currentLocation.text = [NSString stringWithFormat:@"%@, %@",state,city];
        currentLocation.text = @"what the shnizzle?";

        NSLog(@"state = %@, and city = %@",state,city);
        NSLog(@"currentLocation.text = %@",currentLocation.text);
}

и вот вывод консоли:

2009-10-03 16:00:06.311 iParkNow![1061:207] state = (null), and city = New York
2009-10-03 16:00:06.315 iParkNow![1061:207] currentLocation.text = (null)

Кто-нибудь знает, как это возможно?

1 Ответ

1 голос
/ 04 октября 2009

Похоже, что currentLocation равен нулю. Вы убедились, что он настроен правильно?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...