FSCalendar icon indicating copy to clipboard operation
FSCalendar copied to clipboard

How can I modify the calendar height dynamically?

Open mcontin opened this issue 6 years ago • 9 comments

I'm trying to modify the calendar's height programmatically by modifying its height constraint programmatically but the calendar won't resize its content. The view's frame is updated correctly because I have other views constrained to the bottom and they move, but the content won't adapt. I have implemented boundingRectWillChange but it's not getting called, I've tried calling .layoutIfNeeded() on both the controller's view and the calendar's but nothing changes.

mcontin avatar Oct 20 '17 13:10 mcontin

I have a same problem too. I couldn't figure out a way to do it properly.

oselvi avatar Nov 14 '17 11:11 oselvi

I have a same problem too. I couldn't figure out a way to do it properly.

hao-li avatar Dec 30 '17 10:12 hao-li

Same here.. Database and Delegate are configured

ronaldofortini avatar Jan 11 '18 11:01 ronaldofortini

Same here. I set height constraint to 0 in viewDidLoad() method. Then changed height to 220 on button tap. Height of view is changing and title is showing, but date cells are not showing.

simulator screen shot - iphone 8 plus - 2018-01-23 at 15 23 13

nayanarv avatar Jan 23 '18 09:01 nayanarv

Anyone know answer to this problem?? I need to change the height of the Calendar dynamically when the iPad changes its orientation to landscape mode. So far everything I have tried makes it really buggy. I tried it with the demo project too. Changing height constraint of FSCalendar using auto layout breaks things.

coolcool1994 avatar Apr 19 '18 01:04 coolcool1994

Do any one got the solution for this?

GaneshKumarSelvam avatar Jun 14 '18 13:06 GaneshKumarSelvam

I set the FSCalendar's constraints to left and top are fixed, width and height are fixed on contain view. And set the constraint's height. It works very well. Thanks. 00-0 00-1

loyal15 avatar Jul 04 '18 13:07 loyal15

Masonry works too!

发自我的 iPhone

在 2018年7月4日,下午9:42,loyal15 [email protected] 写道:

Hello, I solved this issue. I set the FSCalendar's constrains to left and top are fixed, width and height are fixed on contain view. It works very well. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

kiradea avatar Jul 05 '18 03:07 kiradea

https://stackoverflow.com/a/51649753/3046504

alexandre-g avatar Aug 02 '18 09:08 alexandre-g