开发者

UITextField Crazyness

开发者 https://www.devze.com 2022-12-08 03:51 出处:网络
so here\'s the abridged code: - (void)viewDidLoad { [super viewDidLoad]; currentLocation = 开发者_开发知识库[[UITextField alloc] init];

so here's the abridged code:

 - (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);
}

and here's the console output:

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)

anybody have any idea how this is possible?


Looks like currentLocation is nil. Have you verified that it's getting set properly?

0

精彩评论

暂无评论...
验证码 换一张
取 消