Closed kwerle closed 9 years ago
Thanks for the observations. Thats another option Kurt, I made the adoption of the delegate not use IBOutlets in case they would not use storyboards.
Doesn't really matter if it's a storyboard or a xib. It does no harm, and it makes it codeless if you are using xcode/IB.
Also need to implement
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
_animationInProgress = NO;
[self setupCaptureManager:RearFacingCamera];
cameraBeingUsed = RearFacingCamera;
[self composeInterface];
[[_captureManager captureSession] startRunning];
}
return self;
}
(so clearly refactor)
Your recommendation for making the id delegate an IBOutlet is a great idea, however given the use this lib will probably get I believe its better to leave as it is for clarity's sake for new developers.
I already pushed the initWithCoder function, thank you very much!
I agree, the code base is cleaner and easier to use this way! Thanks GabrielAlva
@property (nonatomic, weak) id delegate;
->
@property (nonatomic, weak) IBOutlet id delegate;
Now I can just hook it up in XCode/IB.