Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  IntroQuestionView.m  Sprache: unbekannt

 
Spracherkennung für: .m vermutete Sprache: Lisp {Lisp[45] Masm[45] MT940[11]} [Methode: maximale Elemente, drei Dimensionen]

#import "IntroQuestionView.h"
#import <ThreemaFramework/BundleUtil.h>

@implementation IntroQuestionView

- (void)awakeFromNib {
    [self setup];

    [super awakeFromNib];
}

- (void)setShowOnlyOkButton:(BOOL)showOnlyOkButton {
    _alertPane.hidden = (showOnlyOkButton == NO);
    _okButton.hidden = (showOnlyOkButton == NO);
    _confirmPane.hidden = showOnlyOkButton;
    _yesButton.hidden = showOnlyOkButton;
    _noButton.hidden = showOnlyOkButton;
}

- (BOOL)showOnlyOkButton {
    return _yesButton.hidden;
}

- (void)setTitle:(NSString *)title {
    _questionTitle.hidden = ([title  isEqual: @""]);
    _questionTitle.text = title;
}

- (void)setup {
    self.backgroundColor = [UIColor clearColor];
    
    _yesButton.layer.cornerRadius = 3;
    _okButton.layer.cornerRadius = 3;
    
    _yesButton.backgroundColor = UIColor.tintColor;
    [_yesButton setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
    _yesButton.accessibilityIdentifier = @"setupYesButton";
    _okButton.backgroundColor = UIColor.tintColor;
    [_okButton setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
    _okButton.accessibilityIdentifier = @"setupOKButton";

    _noButton.layer.borderWidth = 1;
    _noButton.layer.borderColor = _yesButton.backgroundColor.CGColor;
    _noButton.layer.cornerRadius = 3;
    // With a transparent background, the button is only accessible when the finger is positioned over the text
    _noButton.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.02];
    _noButton.accessibilityIdentifier = @"IntroQuestionViewNoButton";

    [_yesButton setTitle:[BundleUtil localizedStringForKey:@"yes"] forState:UIControlStateNormal];
    [_noButton setTitle:[BundleUtil localizedStringForKey:@"no"] forState:UIControlStateNormal];
    [_okButton setTitle:[BundleUtil localizedStringForKey:@"ok"] forState:UIControlStateNormal];
    
    [_noButton setTitleColor:UIColor.tintColor forState:UIControlStateNormal];
}

- (IBAction)yesAction:(id)sender {
    [_delegate selectedYes:self];
}

- (IBAction)noAction:(id)sender {
    [_delegate selectedNo:self];
}

- (IBAction)okAction:(id)sender {
    [_delegate selectedOk:self];
}

@end

[Dauer der Verarbeitung: 0.16 Sekunden]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104845
#Domains=499263