Лучшая практика метода дисплея экрана-заставки C#

Небольшой вариант ответа Бена, имеющий дело с детьми, которые выходят за пределы их родителей. Если clipChildren имеет значение YES, то это не вернет YES для точек, которые находятся вне основного элемента управления, но внутри какого-либо дочернего элемента. если clipChildren НЕТ, это то же самое, что и у Бена.

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
    BOOL clipChildren = YES;

    if (!clipChildren || [super pointInside:point withEvent:event]) {
        for (UIView * view in [self subviews]) {
            if (view.userInteractionEnabled && [view pointInside:[self convertPoint:point toView:view] withEvent:event]) {
                return YES;
            }
        }
    }
    return NO;
}
7
задан Andy 4 November 2009 в 12:45
поделиться

2 ответа

Вариант 2, вероятно, столкнется с проблемами, потому что тогда вы будете использовать тот же цикл сообщений, что и MainForm, но из другого потока.

Вариант 1 подойдет.

3
ответ дан 7 December 2019 в 14:34
поделиться

I realize that this may be an unusual viewpoint but have you considered not using a Splash screen and instead showing the information on the 'welcome page' or 'help > about' screen instead?

There are a handful of reasons to do this:

  1. Unless you get into multi-threading, a Splash Screen may not repaint properly if some alert/msgbox pops up over the top of it, negating the benefit of the splash screen entirely.

  2. Splash screens that show 'you have plugins x, y and z' installed can't really tell this until that information has been loaded up. By the time this info is loaded, your app is ready to go, so you'll either close the splash screen or it'll be in the way of the user.

  3. If I look away and miss the splash screen, I'll miss whatever information you're telling me. If 'License expires in 3 days' is part of that information, and today is Friday, that means I won't realise that on Monday, I can't use the app. Obscure, but I've seen it.

1
ответ дан 7 December 2019 в 14:34
поделиться
Другие вопросы по тегам:

Похожие вопросы: