LuxChat  2.0
Instant messenger for iOS
PFLogInViewController.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 <Parse/PFConstants.h>
25 
26 #import <ParseUI/ParseUIConstants.h>
27 #import <ParseUI/PFLogInView.h>
28 
29 NS_ASSUME_NONNULL_BEGIN
30 
32 @class PFUser;
34 
38 @interface PFLogInViewController : UIViewController <UITextFieldDelegate>
39 
43 
49 @property (nonatomic, assign) PFLogInFields fields;
50 
51 
57 @property (nullable, nonatomic, strong, readonly) PFLogInView *logInView;
58 
62 
68 @property (nullable, nonatomic, weak) id<PFLogInViewControllerDelegate> delegate;
69 
75 @property (nullable, nonatomic, copy) NSArray<NSString *> *facebookPermissions;
76 
83 @property (nullable, nonatomic, strong) PFSignUpViewController *signUpController;
84 
92 @property (nonatomic, assign) BOOL emailAsUsername;
93 
94 @end
95 
99 
103 extern NSString *const PFLogInSuccessNotification;
104 
109 extern NSString *const PFLogInFailureNotification;
110 
114 extern NSString *const PFLogInCancelNotification;
115 
119 
124 @protocol PFLogInViewControllerDelegate <NSObject>
125 
126 @optional
127 
131 
141 - (BOOL)logInViewController:(PFLogInViewController *)logInController
142 shouldBeginLogInWithUsername:(NSString *)username
143  password:(NSString *)password;
144 
148 
155 - (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user;
156 
166 - (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(nullable NSError *)error;
167 
173 - (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController;
174 
175 @end
176 
177 NS_ASSUME_NONNULL_END
Definition: PFLogInViewController.h:38
PFSignUpViewController * signUpController
Definition: PFLogInViewController.h:83
Definition: PFLogInView.h:79
BOOL emailAsUsername
Definition: PFLogInViewController.h:92
Definition: PFLogInViewController.h:124
Definition: PFSignUpViewController.h:38
id< PFLogInViewControllerDelegate > delegate
Definition: PFLogInViewController.h:68
PFLogInView * logInView
Definition: PFLogInViewController.h:57
NSArray< NSString * > * facebookPermissions
Definition: PFLogInViewController.h:75
PFLogInFields fields
Definition: PFLogInViewController.h:49