Memory warnings is a method of memory management apple implemented into iOS. If the device is running low on memory, it will send out a memory warning. It expects every running app to respond to this warning by clearing as much dirty memory as possible. It will do three rounds of memory warnings. The first two levels are basic messages to clear memory. If you don't respond to them in time, or don't clear enough memory by the 3rd level your app will be terminated as it's not playing well with the iOS.
Paste in return;
at the end of if (obshapedCountryButtons.tag==i+1)
block.
Uncomment [setColor release]; [tap release];
code. Finding object with current tag is bad idea. Replace foreach loop with some finding block.
index = [scrollBaseView.subviews indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
}