mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
no message
This commit is contained in:
42
TelegramUI/STPFormTextField.h
Executable file
42
TelegramUI/STPFormTextField.h
Executable file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// STPFormTextField.h
|
||||
// Stripe
|
||||
//
|
||||
// Created by Jack Flintermann on 7/16/15.
|
||||
// Copyright (c) 2015 Stripe, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class STPFormTextField;
|
||||
|
||||
typedef NS_ENUM(NSInteger, STPFormTextFieldAutoFormattingBehavior) {
|
||||
STPFormTextFieldAutoFormattingBehaviorNone,
|
||||
STPFormTextFieldAutoFormattingBehaviorPhoneNumbers,
|
||||
STPFormTextFieldAutoFormattingBehaviorCardNumbers,
|
||||
STPFormTextFieldAutoFormattingBehaviorExpiration,
|
||||
};
|
||||
|
||||
@protocol STPFormTextFieldDelegate <UITextFieldDelegate>
|
||||
@optional
|
||||
- (void)formTextFieldDidBackspaceOnEmpty:(nonnull STPFormTextField *)formTextField;
|
||||
- (nonnull NSAttributedString *)formTextField:(nonnull STPFormTextField *)formTextField
|
||||
modifyIncomingTextChange:(nonnull NSAttributedString *)input;
|
||||
- (void)formTextFieldTextDidChange:(nonnull STPFormTextField *)textField;
|
||||
@end
|
||||
|
||||
@interface STPFormTextField : UITextField
|
||||
|
||||
@property(nonatomic, readwrite, nullable) UIColor *defaultColor;
|
||||
@property(nonatomic, readwrite, nullable) UIColor *errorColor;
|
||||
@property(nonatomic, readwrite, nullable) UIColor *placeholderColor;
|
||||
|
||||
@property(nonatomic, readwrite, assign)BOOL selectionEnabled; // defaults to NO
|
||||
@property(nonatomic, readwrite, assign)BOOL preservesContentsOnPaste; // defaults to NO
|
||||
@property(nonatomic, readwrite, assign)STPFormTextFieldAutoFormattingBehavior autoFormattingBehavior;
|
||||
@property(nonatomic, readwrite, assign)BOOL validText;
|
||||
@property(nonatomic, readwrite, weak, nullable)id<STPFormTextFieldDelegate>formDelegate;
|
||||
|
||||
- (CGSize)measureTextSize;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user