linphone-iphone/Classes/LinphoneUI/UIAssistantTextField.h
Gautier Pelloux-Prayer ba3b82ed51 finishing assistant
2016-08-01 15:18:18 +02:00

28 lines
758 B
Objective-C

//
// UIAssistantTextField.h
// linphone
//
// Created by Gautier Pelloux-Prayer on 30/09/15.
//
//
#import <UIKit/UIKit.h>
typedef BOOL (^DisplayErrorPred)(NSString *inputEntry);
@interface UIAssistantTextField : UITextField <UITextFieldDelegate>
@property(nonatomic, strong) IBOutlet UIView* nextFieldResponder;
@property(nonatomic, strong) IBOutlet UILabel *errorLabel;
@property(nonatomic, readonly) DisplayErrorPred showErrorPredicate;
@property(nonatomic, strong) NSString *lastText;
// we should show error only when user finished editted the field at least once
@property(atomic) BOOL canShowError;
- (void)showError:(NSString *)msg when:(DisplayErrorPred)pred;
- (void)showError:(NSString *)msg;
- (BOOL)isInvalid;
- (BOOL)isVisible;
@end