Adjustment sliders customisation - IOS Native App

Sani M
Sani M Posts: 1

Hi team.

We’re working on CameraKit integration within our application and we’re going to use
SCSDKCameraKitReferenceUI to build UI for it.

We want to customise how adjustments sliders look like, but we have an issue with that.

Adjustments sliders are represented by AdjustmentControlView class.

We see that AdjustmentControlView is a public class, so we can’t inherit it in our code to make any customisations.

public class AdjustmentControlView: UIView {
    public weak var delegate: AdjustmentControlViewDelegate?

// Implementation

}

Moreover CameraController class, which manages the camera and lenses stack, conforms to
AdjustmentControlViewDelegate protocol, which tightly coupled with AdjustmentControlView type. CameraController instance is a delegate of AdjustmentControlView instance.

open class CameraController: NSObject, LensRepositoryGroupObserver, LensPrefetcherObserver, LensHintDelegate,
    MediaPickerViewDelegate, AdjustmentControlViewDelegate {
    public func adjustmentControlView(_ control: AdjustmentControlView, sliderValueChanged value: Double) {
        // Method implementation
    }
    // Implementation
}
public protocol AdjustmentControlViewDelegate: AnyObject {
    func adjustmentControlView(_ control: AdjustmentControlView, sliderValueChanged value: Double)

}

So, here are 2 issues:
1. Looks like AdjustmentControlView doesn’t support inheritance, so we can’t create a subclass to make necessary UI adjustments and use it everywhere AdjustmentControlView is used.
2. CameraController is tightly coupled (conforming to AdjustmentControlViewDelegate protocol) with AdjustmentControlView class, so we can’t use any other type as an adjustment control here.

Based on that, we have 2 questions:
1. Can we customise how AdjustmentControlView instance looks like in some way?
2. Should we write our own implementation of CameraController from scratch to be able to use our own custom class of adjustment control?

Thanks a lot,
Sani

Answers