I have a problem. I can’t understand why this is happening, maybe you guys can.
I created a UIBarButtonItem in IB and correctly bound it. Set a property and synthesized it. In the beginning, I installed btn disabled (viewWillAppear). Then I try to add an entry to mysql db:
NSString *URLStr = [NSString stringWithFormat:@"http://www.justfortestingandsoon.com/example.php?entry=%@", myEntry];
URLStr = [URLStr stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSLog(@"URLStr: %@",URLStr);
NSURL *addURL = [NSURL URLWithString:URLStr];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:addURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0];
urlConnectionSet = [NSURLConnection connectionWithRequest:urlRequest delegate:self];
In it "didReceiveData ..." I check what value is returned:
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
NSData *myData;
myData = data;
NSString *testString = [[NSString alloc] initWithData:myData encoding:NSASCIIStringEncoding];
NSLog(@"receivedData: %@", testString);
if ([testString isEqualToString:@"ENABLED"]) {
self.notificationBtnDeactivate.enabled = YES;
}
...
I already debugged it. String self.notificationBtnDeactivate.enabled = YES; Called, but without any noticeable changes in the user interface.
Any ideas?
Thank you so much!
source
share