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

Layout is not working (Swift 2.2, Xcode 7.3) #352

Closed
eMdOS opened this issue Jul 1, 2016 · 1 comment
Closed

Layout is not working (Swift 2.2, Xcode 7.3) #352

eMdOS opened this issue Jul 1, 2016 · 1 comment

Comments

@eMdOS
Copy link

eMdOS commented Jul 1, 2016

Taking a look at your Swift sample, I tried the same, I mean, I tried to have calendarView as @IBOutlet, and its height constraint as @IBOutlet too.

(I'm trying to implement the .Week mode)

The view takes the suitable height, but the views inside are not being rendered properly. If I add the code you mentioned in the doc, it creates an infinity loop trying to redraw calendarView's layout.

func calendar(calendar: FSCalendar, boundingRectWillChange bounds: CGRect, animated: Bool) {
    print(#function, bounds)
    calendarViewHeightConstant.constant = bounds.height
    view.layoutIfNeeded()
}

Is there any workaround or solution for that?

@WenchaoD
Copy link
Owner

Hi @eMdOS I'm not sure where the problem is based on your description. Can u share a demo which reproduces your problem?

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