-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use class interface/header for TyphooonAssistedFactoryProvider #176
Comments
Consider the following duplication: /**
* Factory for returning a controller with delegate.
*/
@protocol VBRequestRVIControllerFactory
@property(nonatomic, strong, readonly) VBRequestRVIView* rviView;
- (VBRequestRVIViewController*)controllerWithDelegate:(id <VBRequestRVIControllerDelegate>)delegate;
@end
/**
* Controller to solicit required or voluntary (RVI) information before proceeding to checkout.
*/
@interface VBRequestRVIViewController : UIViewController
@property(nonatomic, strong) VBRequestRVIView* rviView;
@property(nonatomic, weak, readonly) id <VBRequestRVIControllerDelegate> delegate;
- (instancetype)initWithRviView:(VBRequestRVIView*)rviView delegate:(id <VBRequestRVIControllerDelegate>)delegate;
@end |
Initially, no. The trick of using the protocols simplifies the process (and the code) a lot, because we know that the protocol only have creation methods, and the readonly properties are dependencies. For your case, for example, if we only have the Possible? Yes, but I think sticking to a more traditional approach, even if it implies a little bit of repetition, gives a better solution. Anyway, if you give me an example of how the final usage of the only |
I see. . . let's close this then. I don't have anything to suggest at this stage . . . was just raising a random (probably dumb) question. |
Instead of having to create a separate protocol for TyphoonAssistedFactoryProvider, could we just use the class' interface/header ?
The text was updated successfully, but these errors were encountered: