Skip to content
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

close button not visible in iphone X #21

Open
alexookah opened this issue Oct 1, 2018 · 3 comments
Open

close button not visible in iphone X #21

alexookah opened this issue Oct 1, 2018 · 3 comments

Comments

@alexookah
Copy link

No description provided.

@fahanas
Copy link

fahanas commented Oct 5, 2018

open POD folder in your projects,

select 'CollieGallery'
open CollieGallery.swift

change getScrollViewFrame() OR fileprivate func getInitialAvaiableSize()

1 . fileprivate func getScrollViewFrame(_ avaiableSize: CGSize) -> CGRect
{
let x: CGFloat = -options.gapBetweenPages
let y: CGFloat = 40.0 //default value is 'zero' top view (it will show close and share button
iphoneX)
let width: CGFloat = avaiableSize.width + options.gapBetweenPages
let height: CGFloat = avaiableSize.height - 40 // minus 40 helps you will get image in view
correct form

    return CGRect(x: x, y: y, width: width, height: height)
}
  1. fileprivate func getInitialAvaiableSize()
    change size of view

this will also help you
//change all 'y' from ZERO to 30
fileprivate func getCloseButtonFrame(_ avaiableSize: CGSize) -> CGRect {
return CGRect(x: 0, y: 30, width: 50, height: 50)
}

fileprivate func getActionButtonFrame(_ avaiableSize: CGSize) -> CGRect {
    return CGRect(x: avaiableSize.width - 50, y: 30, width: 50, height: 50)
}

fileprivate func getCustomButtonFrame(_ avaiableSize: CGSize, forIndex index: Int) -> CGRect {
    let position = index + 2
    
    return CGRect(x: avaiableSize.width - CGFloat(50 * position), y: 30, width: 50, height: 50)
}

@alexookah
Copy link
Author

make a pull request to integrate this change into pod

@ykphuah
Copy link

ykphuah commented Dec 14, 2018

on iPhone XR emulator it is visible, but can't be clicked.

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

No branches or pull requests

3 participants