I’m using a var current_query to keep track of urls to load in my app. When I spec current_query with a static type string, i.e. current_query = @"hey"; It works to be expected, but when I start using dynamic values, such as.. current_query = [NSString stringWithFormat:@"hey%@",hey2]; I get weird results.. When I NSLog(@"%@",current_query);, I also get weird results like <1002f2c8 c0a8016a 00000000 00000000> Is it converting my string somehow? Whats going on here?
current_query is in my header file as NSString *current_query; and @property (nonatomic, retain) NSString *current_query; and then in my implementation file with @synthesize current_query;
Thanks all!
Try setting the property instead of setting the instance variable directly:
(Aside:
currentQueryis the standard Obj-C naming convention.)