call this line
@"No instances of %@",self.thisSpec.activityOfInterest
in one NSString
NSString *alertstr=[NSString stringWithFormat:@"No instances of %@",self.thisSpec.activityOfInterest];
after that call your UIAlertView
and then rearrange the word delegate:nil
into delegate:self
if (aOiCount == 0)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:alertStr message:@"Please select an activity or Cancel" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}