Silver Challenge Solution


#1

Well, I’m running through these challenges and thinking I’m doing something wrong here. Anyway, my solution for this challenge was also easy to implement. I set an instance variable to the menu and used the isMenuVisible property to determine if a line has been selected. I placed the following code at the beginning of the moveLine: method

if ([menu isMenuVisible])
{
        [menu setMenuVisible:NO animated:YES];
        [self setSelectedLine:nil];
        return;
}