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

iPad issue #9

Open
siideffect opened this issue Apr 8, 2017 · 2 comments
Open

iPad issue #9

siideffect opened this issue Apr 8, 2017 · 2 comments

Comments

@siideffect
Copy link

Hello, i am actually using this awesome library in my project. I am almost done with it, but on the iPad, i experiencing an issue, which i dont know how to solve...
Seems like the scrolling, does not work properly. On the iPhone, it works like i do expect while on iPad, i cannot scroll to the last rows of the picker. Do you have any solution for this?
Thanks in advance

@vsouza
Copy link
Member

vsouza commented May 2, 2017

Hi @siideffect thanks for reporting this bug. Can you attach a screenshot or more details for us?

@siideffect
Copy link
Author

siideffect commented May 3, 2017

Hi @vsouza , thanks for your reply. Unfortunately i cannot post a ss because i decided to dive into library code and i found a workaround for this issue. The error is relative to tableview frames. You should be able to reproduce the issue running the project on iPad, i hope so.
By the way, the (not elegant for sure, but working) workaround, was to detect if we are on an ipad or on an iphone, and change the frame according to that. Here the func setupTables, which i edited on the first part (rest has not been changed):

` 
fileprivate func setupTables() {   
     
        let frame1 : CGRect
        let frame2 : CGRect

        if view.isIpad{
            
            let s:CGFloat = view.bounds.height/2
            frame1 = CGRect(x: 30, y: 0+s/2, width: 100, height: self.view.bounds.height-s)
            frame2 = CGRect(x: self.view.frame.width - 100, y: 0+s/2, width: 100, height: self.view.bounds.height-s)

        }else{
            frame1 = CGRect(x: 30, y: 0, width: 100, height: self.view.bounds.height)
            frame2 = CGRect(x: self.view.frame.width - 100, y: 0, width: 100, height: self.view.bounds.height)

        }

        leftTimeTable = UITableView(frame: frame1, style: .plain)
        rightTimeTable = UITableView(frame: frame2, style: .plain)

..........

} `

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

2 participants