LuxChat  2.0
Instant messenger for iOS
PFLogInView.h
1 /*
2  * Copyright (c) 2014, Parse, LLC. All rights reserved.
3  *
4  * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5  * copy, modify, and distribute this software in source code or binary form for use
6  * in connection with the web services and APIs provided by Parse.
7  *
8  * As with any software that integrates with the Parse platform, your use of
9  * this software is subject to the Parse Terms of Service
10  * [https://www.parse.com/about/terms]. This copyright notice shall be
11  * included in all copies or substantial portions of the software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19  *
20  */
21 
22 #import <UIKit/UIKit.h>
23 
24 #import <ParseUI/ParseUIConstants.h>
25 
26 NS_ASSUME_NONNULL_BEGIN
27 
34 typedef NS_OPTIONS(NSInteger, PFLogInFields) {
36  PFLogInFieldsNone = 0,
38  PFLogInFieldsUsernameAndPassword = 1 << 0,
40  PFLogInFieldsPasswordForgotten = 1 << 1,
42  PFLogInFieldsLogInButton = 1 << 2,
44  PFLogInFieldsFacebook = 1 << 3,
46  PFLogInFieldsTwitter = 1 << 4,
48  PFLogInFieldsSignUpButton = 1 << 5,
50  PFLogInFieldsDismissButton = 1 << 6,
51 
53  PFLogInFieldsDefault = (PFLogInFieldsUsernameAndPassword |
54  PFLogInFieldsLogInButton |
55  PFLogInFieldsSignUpButton |
56  PFLogInFieldsPasswordForgotten |
57  PFLogInFieldsDismissButton)
58 };
59 
65 extern NSString *const PFLogInViewUsernameFieldAccessibilityIdentifier;
66 extern NSString *const PFLogInViewPasswordFieldAccessibilityIdentifier;
67 extern NSString *const PFLogInViewLogInButtonAccessibilityIdentifier;
68 extern NSString *const PFLogInViewSignUpButtonAccessibilityIdentifier;
69 extern NSString *const PFLogInViewPasswordForgottenButtonAccessibilityIdentifier;
70 extern NSString *const PFLogInViewTwitterButtonAccessibilityIdentifier;
71 extern NSString *const PFLogInViewFacebookButtonAccessibilityIdentifier;
72 extern NSString *const PFLogInViewDismissButtonAccessibilityIdentifier;
73 
74 @class PFTextField;
75 
79 @interface PFLogInView : UIScrollView
80 
84 
94 - (instancetype)initWithFields:(PFLogInFields)fields;
95 
101 @property (nullable, nonatomic, weak) UIViewController *presentingViewController;
102 
106 
108 @property (nullable, nonatomic, strong) UIView *logo;
109 
113 
119 @property (nonatomic, assign) BOOL emailAsUsername;
120 
124 
128 @property (nonatomic, assign, readonly) PFLogInFields fields;
129 
133 @property (nullable, nonatomic, strong, readonly) PFTextField *usernameField;
134 
138 @property (nullable, nonatomic, strong, readonly) PFTextField *passwordField;
139 
143 @property (nullable, nonatomic, strong, readonly) UIButton *passwordForgottenButton;
144 
148 @property (nullable, nonatomic, strong, readonly) UIButton *logInButton;
149 
153 @property (nullable, nonatomic, strong, readonly) UIButton *facebookButton;
154 
158 @property (nullable, nonatomic, strong, readonly) UIButton *twitterButton;
159 
163 @property (nullable, nonatomic, strong, readonly) UIButton *signUpButton;
164 
168 @property (nullable, nonatomic, strong, readonly) UIButton *dismissButton;
169 
175 @property (nullable, nonatomic, strong, readonly) UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));
176 
182 @property (nullable, nonatomic, strong, readonly) UILabel *signUpLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."));
183 
184 @end
185 
186 NS_ASSUME_NONNULL_END
UILabel *externalLogInLabel __attribute__(PARSE_UI_DEPRECATED("This property is deprecated and will always be nil."))
UIButton * logInButton
Definition: PFLogInView.h:148
UIView * logo
The logo. By default, it is the Parse logo.
Definition: PFLogInView.h:108
UIButton * passwordForgottenButton
Definition: PFLogInView.h:143
PFTextField * passwordField
Definition: PFLogInView.h:138
Definition: PFLogInView.h:79
UIButton * dismissButton
Definition: PFLogInView.h:168
Definition: PFTextField.h:47
UIViewController * presentingViewController
Definition: PFLogInView.h:101
PFTextField * usernameField
Definition: PFLogInView.h:133
UIButton * twitterButton
Definition: PFLogInView.h:158
UIButton * facebookButton
Definition: PFLogInView.h:153
BOOL emailAsUsername
Definition: PFLogInView.h:119
UIButton * signUpButton
Definition: PFLogInView.h:163