Skip to content
  • Tim Oliver's avatar
    6d5c5df8
    Make TOCropOverlayView.h public so the grid overlay is visible to Swift · 6d5c5df8
    Tim Oliver authored
    TOCropView.h declared `gridOverlayView` as a `TOCropOverlayView *` but only
    forward-declared that class. Swift omits any property whose class it knows
    solely as a forward declaration, so `cropView.gridOverlayView` did not exist
    from Swift in any configuration -- framework, CocoaPods or bridging header.
    That also put the `displayHorizontalGridLines` / `displayVerticalGridLines`
    settings fixed in 3.2.0 out of reach for Swift callers.
    
    Importing the header from TOCropView.h is the fix, but it only works if the
    header is reachable under the framework's own module: TOCropOverlayView.h was
    marked Project in both framework targets, so `<TOCropViewController/
    TOCropOverlayView.h>` did not resolve and the Xcode 26 module verifier failed
    on the quoted fallback. It is now Public in both targets, alongside the other
    headers TOCropView.h already depends on, and imported with the same
    conditional form used for TOCropViewConstants.h.
    
    The test bundle's bridging header previously imported TOCropOverlayView.h
    directly to work around this. That workaround is removed, which makes the
    existing Swift test the regression guard: without the import in TOCropView.h,
    CropViewControllerTests.swift no longer compiles.
    6d5c5df8
    Make TOCropOverlayView.h public so the grid overlay is visible to Swift
    Tim Oliver authored
    TOCropView.h declared `gridOverlayView` as a `TOCropOverlayView *` but only
    forward-declared that class. Swift omits any property whose class it knows
    solely as a forward declaration, so `cropView.gridOverlayView` did not exist
    from Swift in any configuration -- framework, CocoaPods or bridging header.
    That also put the `displayHorizontalGridLines` / `displayVerticalGridLines`
    settings fixed in 3.2.0 out of reach for Swift callers.
    
    Importing the header from TOCropView.h is the fix, but it only works if the
    header is reachable under the framework's own module: TOCropOverlayView.h was
    marked Project in both framework targets, so `<TOCropViewController/
    TOCropOverlayView.h>` did not resolve and the Xcode 26 module verifier failed
    on the quoted fallback. It is now Public in both targets, alongside the other
    headers TOCropView.h already depends on, and imported with the same
    conditional form used for TOCropViewConstants.h.
    
    The test bundle's bridging header previously imported TOCropOverlayView.h
    directly to work around this. That workaround is removed, which makes the
    existing Swift test the regression guard: without the import in TOCropView.h,
    CropViewControllerTests.swift no longer compiles.
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading