Skip to content

Fix for issue #261, Access to UIImagePickerController Object - #262

Open
brt-manishp wants to merge 166 commits into
developfrom
master
Open

Fix for issue #261, Access to UIImagePickerController Object#262
brt-manishp wants to merge 166 commits into
developfrom
master

Conversation

@brt-manishp

Copy link
Copy Markdown

In "showCamera()" there is a local variable called "picker" which I need it access to configure image picker for various use case. So I made a public optional variable of UIImagePickerController in "TLPhotosPickerConfigure" and used it in "showCamera()" with null check

Changes made are as follows in file named TLPhotosPickerViewController.swift

public struct TLPhotosPickerConfigure {
    .........
    public var uiimagePickerController: UIImagePickerController?  //line 99
    .........
}

// MARK: - Camera Picker  
extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
..
..
..
..
private func showCamera() {  //line 595
    guard !maxCheck() else { return }
    if let picker = self.configure.uiimagePickerController {
        self.present(picker, animated: true, completion: nil)
    }else {
        let picker = UIImagePickerController()
        picker.sourceType = .camera
        picker.mediaTypes = [kUTTypeImage as String]
        if self.configure.allowedVideoRecording {
            picker.mediaTypes.append(kUTTypeMovie as String)
            picker.videoQuality = self.configure.recordingVideoQuality
            if let duration = self.configure.maxVideoDuration {
                picker.videoMaximumDuration = duration
            }
        }
        picker.allowsEditing = false
        picker.delegate = self
        self.present(picker, animated: true, completion: nil)
    }
}
..
..
..
..
}

tilltue and others added 30 commits August 28, 2018 07:34
Support for detection if TLPHAsset is created from camera using picker.
Creating Thread-Safe Dictionary
Issue #171 , #169 PR: #168
# Conflicts:
#	Example/TLPhotoPicker.xcodeproj/project.pbxproj
#	Example/TLPhotoPicker/Base.lproj/Main.storyboard
#	TLPhotoPicker/Classes/TLCollectionTableViewCell.swift
joonwlee and others added 22 commits December 27, 2025 22:51
- Remove usedPrefetch condition from willDisplay to fix off-screen cell order display
- Ensure cells always show correct selection state when scrolled into view
- Fix selection order not updating for off-screen cells

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…bclassed. Update necessary dependencies to be public.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…an be subclassed. Update necessary dependencies to be public."

This reverts commit 4852917.
Reverted PR #378 changes due to critical issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…bclassed. Update necessary dependencies to be public.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When didCaptureMediaURL is set on TLPhotosPickerViewController, captured
photos and videos are written to a temp file and the URL is passed to the
callback instead of being saved to the photo library. Existing behaviour
is unchanged when the callback is not set.

Signed-off-by: Rasmus Wøldike <rswoldike@gmail.com>
Signed-off-by: Rasmus Wøldike <rswoldike@gmail.com>
- Use info[.imageURL] with imageExportPreset .compatible to preserve EXIF/GPS metadata
- Only invoke callback on successful file copy (no silent error swallowing)
Dismiss the camera picker and host TLPhotosPickerViewController before invoking didCaptureMediaURL so callers only need to present their next screen.

Preserve dismiss lifecycle hooks and document the present-only callback contract.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.