I am a new iPhone developer. I am working on an application which used two table views. My code was working fine with iOS 6, but when I went to iOS 7, and tried to launch the application I get into below error. Based on some answers present over the net, I Enable Zombie. The initial error message that was returned was EXC_BAD_ACCESS. When I enabled NSZombieEnabled I got the error message "-[CFString retain]: message sent to deallocated instance"
Here is the piece of code, throwing error, The causing the error is,
SystemViewController.h
if(indexPath.section == 0)
{
//User Info section
if(indexPath.row == 0)
{
cell2.label1.text = @"User";
cell2.label2.text = [UserInfoBean userName];
}
else
{
cell2.label1.text = @"SI Host URL";
cell2.label2.text = [UserInfoBean url];
}
cell = cell2;
}
Interface UserInfoBean.h
@implementation UserInfoBean
static NSString *userName;
static NSString *url;
static NSString *presentNode;
+ (NSString *)userName { return userName; }
+ (NSString *)url { return url; }
+ (NSString *)presentNode { return presentNode; }
+ (void)setUserName:(NSString *)newVar { userName = newVar; }
+ (void)setUrl:(NSString *)newVar { url = newVar; }
+ (void)setPresentNode:(NSString *)newVar { presentNode = newVar; }
@end
Thanks in advance!