FSCalendar icon indicating copy to clipboard operation
FSCalendar copied to clipboard

Is it possible to keep the header towards left?

Open isunilapps opened this issue 7 years ago • 5 comments

Need in urgency

  • Is it possible to keep the header towards left? it is in centre always i need to change it for some reasons. i checked for it.. i didnot find any option for that..

I am using

  • Integration method.(cocoapods)
  • Xcode version. e.g. Xcode 8.3.3
  • FSCalendar version the latest only
glass

isunilapps avatar Oct 24 '17 09:10 isunilapps

make changes on FSCalendarStickyHeader.m for text alignment label.textAlignment = NSTextAlignmentLeft;

and titleLabel frame in layoutSubview

_titleLabel.frame = CGRectMake(16.0, _bottomBorder.fs_bottom-titleHeight-weekdayMargin, titleWidth-16.0,titleHeight);

rjndra avatar Nov 16 '17 12:11 rjndra

@rjndra I have made those changes, but it is still center aligned. Do I need to do anything else after making those above changes?

chgaurav92 avatar Apr 24 '19 15:04 chgaurav92

@isunilapps were you able to find any solution for making the header left aligned?

chgaurav92 avatar Apr 24 '19 15:04 chgaurav92

@chgaurav92 did you find the way to do it? I'm facing the same problem, tried the @rjndra solution but it doesn't work. Hope you can help me. Thank's in advance!

Dedalus34 avatar Aug 19 '19 15:08 Dedalus34

better later than never - you can do that by arranging offset -> self.appearance.headerTitleOffset = .init(x: 60, y: 0) where self represents calendar object

infokadze avatar Mar 23 '23 23:03 infokadze