step by step I am advancing creating my first iOS app. Now I am experiencing a strange behaviour on a table view controller which I am not able to solve and I have been searchin
The first issue with code I noticed is you must add you code after
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
not before it. It will guarantee that your view is, at least, loaded.
Second, make from all your string literals const string like this and use it everywhere
static NSString * const kUrgentState = @"Urgent";
And one more common hint: add NSLog(...); or test the value of variable in debug to localise the problem, cause right now it's really to much code, but not still not enough to find a problem. Find the moment when values of variable goes wrong and then fix your question