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

3D Touch Peek and Pop #493

Closed
adavan2107 opened this issue Nov 22, 2016 · 4 comments
Closed

3D Touch Peek and Pop #493

adavan2107 opened this issue Nov 22, 2016 · 4 comments

Comments

@adavan2107
Copy link

How to enable 3D Touch Peek and Pop when i clicked single date in calendar thanks for the help advance.

@WenchaoD
Copy link
Owner

Hi @adavan2107 . Thanks for reporting this. It seems that Peek and Pop is an interesting feature. Will do some research about this:)

@adavan2107
Copy link
Author

Hi @WenchaoD Thanks for the response is there any update in peek and pop

@adavan2107
Copy link
Author

Hai @WenchaoD fixed the issue using following code thanks for awesome library

guard let indexPath = Calendar.collectionView.indexPathForItem(at: location),let cell = Calendar.collectionView.cellForItem(at: indexPath) else { return nil }

        guard let date = Calendar.date(for: indexPath) else {
            
            return nil
        }
        
    
     
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "dd-MM-yyyy"
    
      
        guard let destinationVc = storyboard?.instantiateViewController(withIdentifier: "calendarpost") as? CalendarViewPostListViewController else { return nil }
        destinationVc.selectdate = dateFormatter.string(from: date)
        destinationVc.preferredContentSize = CGSize(width: 0.0, height: 0.0)
        
        previewingContext.sourceRect = cell.frame
        
        destVc = destinationVc

@devanshvyas
Copy link

In which file you have used this code ?

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